Skip to content

Commit

Permalink
Restored custom attr get/set target to seemingly more reliable `docum…
Browse files Browse the repository at this point in the history
…ent.documentElement` ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions]
  • Loading branch information
kudo-sync-bot committed Nov 30, 2024
1 parent f03ee90 commit 93920a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chatgpt/chatgpt-auto-talk/chatgpt-auto-talk.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
// @description:zu Dlala izimpendulo ze-ChatGPT ngokuzenzakalela
// @author Adam Lui
// @namespace https://github.com/adamlui
// @version 2024.11.29.2
// @version 2024.11.29.3
// @license MIT
// @icon https://assets.chatgptautotalk.com/images/icons/openai/black/icon48.png?v=9f1ed3c
// @icon64 https://assets.chatgptautotalk.com/images/icons/openai/black/icon64.png?v=9f1ed3c
Expand Down Expand Up @@ -841,14 +841,14 @@
}).observe(document.body, { attributes: true, subtree: true })

// Disable distracting SIDEBAR CLICK-ZOOM effect
if (!document.head.hasAttribute('sidebar-click-zoom-observed')) {
if (!document.documentElement.hasAttribute('sidebar-click-zoom-observed')) {
new MutationObserver(mutations => mutations.forEach(({ target }) => {
if (target.closest('[class*="sidebar"]') // include sidebar divs
&& !target.id.endsWith('-knob-span') // exclude our sidebarToggle
&& target.style.transform != 'none' // click-zoom occurred
) target.style.transform = 'none'
})).observe(document.body, { attributes: true, subtree: true, attributeFilter: [ 'style' ]})
document.head.setAttribute('sidebar-click-zoom-observed', true)
document.documentElement.setAttribute('sidebar-click-zoom-observed', true)
}

})()

0 comments on commit 93920a3

Please sign in to comment.