Skip to content

Commit

Permalink
fix(notion): bug on changing page
Browse files Browse the repository at this point in the history
  • Loading branch information
askides committed Oct 14, 2024
1 parent aed1fc2 commit 7466ed5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/content/notion.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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')
Expand Down Expand Up @@ -94,7 +92,7 @@ togglbutton.inject(

const wrapper = createWrapper(link)

elem.prepend(wrapper)
document.querySelector('.notion-topbar-action-buttons').prepend(wrapper)
},
},
{ observe: true },
Expand Down

0 comments on commit 7466ed5

Please sign in to comment.