Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

577 B
Raw Blame
export const PAGE_SCROLL_BUTTONS_CHANGED_EVENT = "siyuan-page-scroll-buttons-changed";

export const isPageScrollButtonsEnabled = () =>
    window.siyuan.config.editor.pageScrollButtons === true;

export const updatePageScrollButtons = () => {
    document.querySelectorAll(".protyle-scroll__page").forEach(element => {
        element.dispatchEvent(new Event(PAGE_SCROLL_BUTTONS_CHANGED_EVENT));
    });
    document.querySelectorAll<HTMLInputElement>('input[id="editor.pageScrollButtons"]').forEach(input => {
        input.checked = isPageScrollButtonsEnabled();
    });
};