Skip to content

Commit baf6504

Browse files
committed
Made sync.configToUI() options optional, destructured updatedKey in sig ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/chatgpt-widescreen]
1 parent 422ad70 commit baf6504

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

chatgpt/chatgpt-widescreen/chatgpt-widescreen-mode.user.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@
235235
// @description:zu Thuthukisa iChatGPT ngemodi zesikrini ezibanzi/egcwele/ephezulu + imodi yokuvimbela i-spam. Futhi isebenza ku-poe.com!
236236
// @author Adam Lui
237237
// @namespace https://github.com/adamlui
238-
// @version 2025.10.10
238+
// @version 2025.10.10.1
239239
// @license MIT
240240
// @icon https://assets.chatgptwidescreen.com/images/icons/widescreen-robot-emoji/icon48.png?v=844b16e
241241
// @icon64 https://assets.chatgptwidescreen.com/images/icons/widescreen-robot-emoji/icon64.png?v=844b16e
@@ -496,7 +496,7 @@
496496

497497
env.ui.hasTallChatbar = await chatbar.is.tall()
498498

499-
sync.configToUI = async function(options) { // from toolbar menu toggles
499+
sync.configToUI = async function({ updatedKey } = {}) { // from toolbar menu toggles
500500
// ... requires components/buttons.js + lib/<chatbar|settings|styles>.js + <config|env|toolbarMenu>
501501

502502
const { site } = env, scriptWasDisabled = !config[`${site}Disabled`]
@@ -513,10 +513,10 @@
513513
styles.update({ keys: ['chatbar', 'tweaks', 'widescreen'] }) // sync HH/HF/TCB/WCB/NCB/BA/WW
514514
chatbar.tweak() // update ChatGPT chatbar inner width or hack Poe btn pos
515515
buttons[config.btnsVisible ? 'insert' : 'remove']() // update button visibility
516-
if (options?.updatedKey == 'btnAnimationsDisabled' && !config.btnAnimationsDisabled) // apply/remove fx
516+
if (updatedKey == 'btnAnimationsDisabled' && !config.btnAnimationsDisabled) // apply/remove fx
517517
// ...to visually signal location + preview fx applied by Button Animations toggle-on
518518
buttons.animate()
519-
else if (/notifBottom|toastMode/.test(options?.updatedKey)) styles.update({ key: 'toast' })
519+
else if (/notifBottom|toastMode/.test(updatedKey)) styles.update({ key: 'toast' })
520520
if (site != 'poe') // toggle free wheel locked in some Spam blocks
521521
document.body[`${ config.blockSpamDisabled ? 'remove' : 'add' }EventListener`](
522522
'wheel', window.enableWheelScroll)
@@ -527,7 +527,7 @@
527527
if (config.notifDisabled) return
528528
settings.save('notifDisabled', true) // suppress notifs for cleaner UI
529529
setTimeout( // ...temporarily
530-
() => settings.save('notifDisabled', false), options?.updatedKey == 'widescreen' ? 1 : 555)
530+
() => settings.save('notifDisabled', false), updatedKey == 'widescreen' ? 1 : 555)
531531
}
532532
}
533533

0 commit comments

Comments
 (0)