Skip to content

Commit 10bd591

Browse files
committed
Moved toggle free wheel lock back to outer level to support extension disabled toggles
1 parent cab1031 commit 10bd591

File tree

2 files changed

+8
-12
lines changed
  • chatgpt-widescreen

2 files changed

+8
-12
lines changed

chatgpt-widescreen/chromium/extension/lib/sync.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,15 @@ window.sync = {
2121
styles.update({ keys: ['chatbar', 'tweaks', 'widescreen'] }) // sync HH/HF/TCB/WCB/NCB/BA/WW
2222
chatbar.tweak() // update ChatGPT chatbar inner width or hack Poe btn pos
2323
buttons[config.btnsVisible ? 'insert' : 'remove']() // update button visibility
24-
if (updatedKey == 'blockSpamDisabled') {
25-
sync.spamBlock()
26-
if (site == 'chatgpt') // toggle free wheel locked in some Spam blocks
27-
document.body[`${ config.blockSpamDisabled ? 'remove' : 'add' }EventListener`](
28-
'wheel', window.enableWheelScroll)
29-
}
24+
if (updatedKey == 'blockSpamDisabled') sync.spamBlock()
3025
else if (updatedKey == 'btnAnimationsDisabled' && !config.btnAnimationsDisabled)
3126
buttons.animate() // to visually signal location + preview fx applied by Button Animations toggle-on
3227
else if (updatedKey == 'tooltipAnimations' && tooltip.div)
3328
tooltip.div.style.transform = `scale(${ config.tooltipAnimations ? 0.8 : 1 })`
3429
else if (/notifBottom|toastMode/.test(updatedKey)) styles.update({ key: 'toast' })
30+
if (site == 'chatgpt') // toggle free wheel locked in some Spam blocks
31+
document.body[`${ config.blockSpamDisabled ? 'remove' : 'add' }EventListener`](
32+
'wheel', window.enableWheelScroll)
3533
}
3634
if (typeof GM_info != 'undefined') toolbarMenu.refresh() // prefixes/suffixes
3735

chatgpt-widescreen/firefox/extension/lib/sync.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,15 @@ window.sync = {
2121
styles.update({ keys: ['chatbar', 'tweaks', 'widescreen'] }) // sync HH/HF/TCB/WCB/NCB/BA/WW
2222
chatbar.tweak() // update ChatGPT chatbar inner width or hack Poe btn pos
2323
buttons[config.btnsVisible ? 'insert' : 'remove']() // update button visibility
24-
if (updatedKey == 'blockSpamDisabled') {
25-
sync.spamBlock()
26-
if (site == 'chatgpt') // toggle free wheel locked in some Spam blocks
27-
document.body[`${ config.blockSpamDisabled ? 'remove' : 'add' }EventListener`](
28-
'wheel', window.enableWheelScroll)
29-
}
24+
if (updatedKey == 'blockSpamDisabled') sync.spamBlock()
3025
else if (updatedKey == 'btnAnimationsDisabled' && !config.btnAnimationsDisabled)
3126
buttons.animate() // to visually signal location + preview fx applied by Button Animations toggle-on
3227
else if (updatedKey == 'tooltipAnimations' && tooltip.div)
3328
tooltip.div.style.transform = `scale(${ config.tooltipAnimations ? 0.8 : 1 })`
3429
else if (/notifBottom|toastMode/.test(updatedKey)) styles.update({ key: 'toast' })
30+
if (site == 'chatgpt') // toggle free wheel locked in some Spam blocks
31+
document.body[`${ config.blockSpamDisabled ? 'remove' : 'add' }EventListener`](
32+
'wheel', window.enableWheelScroll)
3533
}
3634
if (typeof GM_info != 'undefined') toolbarMenu.refresh() // prefixes/suffixes
3735

0 commit comments

Comments
 (0)