From 7466ed575e18db442917d7980b98c300b2f2bac1 Mon Sep 17 00:00:00 2001 From: Renato Pozzi Date: Mon, 14 Oct 2024 17:06:50 +0200 Subject: [PATCH] fix(notion): bug on changing page --- src/content/notion.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/content/notion.js b/src/content/notion.js index edf273195..ab83989cd 100644 --- a/src/content/notion.js +++ b/src/content/notion.js @@ -50,7 +50,7 @@ togglbutton.render( togglbutton.inject( { - node: '.notion-topbar-action-buttons', + node: 'main.notion-frame .notion-scroller:not(.toggl)', renderer: function (elem) { const elements = document.querySelectorAll( '.notion-topbar-action-buttons .toggl-button-notion-wrapper', @@ -60,8 +60,6 @@ togglbutton.inject( elements.forEach((element) => element.remove()) } - elem.style.position = 'relative' - function getDescription() { const controls = document.querySelector('.notion-page-controls') const topBar = document.querySelector('.notion-topbar') @@ -94,7 +92,7 @@ togglbutton.inject( const wrapper = createWrapper(link) - elem.prepend(wrapper) + document.querySelector('.notion-topbar-action-buttons').prepend(wrapper) }, }, { observe: true },