|
235 | 235 | // @description:zu Thuthukisa iChatGPT ngemodi zesikrini ezibanzi/egcwele/ephezulu + imodi yokuvimbela i-spam. Futhi isebenza ku-poe.com! |
236 | 236 | // @author Adam Lui |
237 | 237 | // @namespace https://github.com/adamlui |
238 | | -// @version 2025.10.10 |
| 238 | +// @version 2025.10.10.1 |
239 | 239 | // @license MIT |
240 | 240 | // @icon https://assets.chatgptwidescreen.com/images/icons/widescreen-robot-emoji/icon48.png?v=844b16e |
241 | 241 | // @icon64 https://assets.chatgptwidescreen.com/images/icons/widescreen-robot-emoji/icon64.png?v=844b16e |
|
496 | 496 |
|
497 | 497 | env.ui.hasTallChatbar = await chatbar.is.tall() |
498 | 498 |
|
499 | | - sync.configToUI = async function(options) { // from toolbar menu toggles |
| 499 | + sync.configToUI = async function({ updatedKey } = {}) { // from toolbar menu toggles |
500 | 500 | // ... requires components/buttons.js + lib/<chatbar|settings|styles>.js + <config|env|toolbarMenu> |
501 | 501 |
|
502 | 502 | const { site } = env, scriptWasDisabled = !config[`${site}Disabled`] |
|
513 | 513 | styles.update({ keys: ['chatbar', 'tweaks', 'widescreen'] }) // sync HH/HF/TCB/WCB/NCB/BA/WW |
514 | 514 | chatbar.tweak() // update ChatGPT chatbar inner width or hack Poe btn pos |
515 | 515 | 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 |
517 | 517 | // ...to visually signal location + preview fx applied by Button Animations toggle-on |
518 | 518 | 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' }) |
520 | 520 | if (site != 'poe') // toggle free wheel locked in some Spam blocks |
521 | 521 | document.body[`${ config.blockSpamDisabled ? 'remove' : 'add' }EventListener`]( |
522 | 522 | 'wheel', window.enableWheelScroll) |
|
527 | 527 | if (config.notifDisabled) return |
528 | 528 | settings.save('notifDisabled', true) // suppress notifs for cleaner UI |
529 | 529 | setTimeout( // ...temporarily |
530 | | - () => settings.save('notifDisabled', false), options?.updatedKey == 'widescreen' ? 1 : 555) |
| 530 | + () => settings.save('notifDisabled', false), updatedKey == 'widescreen' ? 1 : 555) |
531 | 531 | } |
532 | 532 | } |
533 | 533 |
|
|
0 commit comments