diff --git a/mods/admiraldus-global-linking-blocks/mod.js b/mods/admiraldus-global-linking-blocks/mod.js index fa20dd3..b965e5b 100644 --- a/mods/admiraldus-global-linking-blocks/mod.js +++ b/mods/admiraldus-global-linking-blocks/mod.js @@ -19,6 +19,14 @@ module.exports = { link: 'https://github.com/admiraldus', avatar: 'https://raw.githubusercontent.com/admiraldus/admiraldus/main/module.gif', }, + options: [ + { + key: 'hidePageButton', + label: 'show the page link button', + type: 'toggle', + value: true, + }, + ], hacks: { 'renderer/preload.js'(store, __exports) { document.addEventListener('readystatechange', () => { @@ -43,27 +51,43 @@ module.exports = { const pageClass = 'admiraldus-glb-page-button'; const blockClass = 'admiraldus-glb-block-button'; const spanClass = 'admiraldus-glb-span-hide'; - /** - * Create the page link button and append it to the topbar. - * - * @return {create} Returns "create()" if not appended. - */ - const pageButton = !function create() { - const target = x$.sel('.notion-topbar-share-menu'); - const attr = [ - `class="${pageClass}" role="button" tabindex="0"`, - `class="${spanClass}"`, - ]; - const html = x$.el( - `