Skip to content

Commit c016d4a

Browse files
committed
Bumped JS resources + app.latestResourceCommitHash, synced app.msgs + new Button Visibility setting (#128) ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/chatgpt-widescreen]
1 parent 64cf12b commit c016d4a

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

greasemonkey/chatgpt-widescreen-mode.user.js

Lines changed: 9 additions & 7 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-perplexity.ai + poe.com!
236236
// @author Adam Lui
237237
// @namespace https://github.com/adamlui
238-
// @version 2025.4.2
238+
// @version 2025.4.4
239239
// @license MIT
240240
// @icon https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@844b16e/assets/images/icons/widescreen-robot-emoji/icon48.png
241241
// @icon64 https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@844b16e/assets/images/icons/widescreen-robot-emoji/icon64.png
@@ -258,9 +258,9 @@
258258
// @require https://cdn.jsdelivr.net/npm/json5@2.2.3/dist/index.min.js#sha256-S7ltnVPzgKyAGBlBG4wQhorJqYTehj5WQCrADCKJufE=
259259
// @require https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@5d3db9c/chromium/extension/lib/chatbar.js#sha256-KIIufXI7xyuVFSrj2NW0RQGloNEl80tzuBgxaOsCMB8=
260260
// @require https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@58c2d29/chromium/extension/lib/dom.js#sha256-WXPxvMnJU6LGvINaENBbmvGXTAcAlXlBkyGwIDGXiC4=
261-
// @require https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@7ed283d/chromium/extension/lib/settings.js#sha256-XQWeorSHtTm0rLz9FCXtU2rSk8ds0Tgj11Pw7a4Tfz4=
261+
// @require https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@64cf12b/chromium/extension/lib/settings.js#sha256-ziqiWd1wvVZSmdEiIgSNZoCjpwkC2MQz1f+j8oxVCSk=
262262
// @require https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@f9ebcb0/chromium/extension/lib/ui.js#sha256-Bg82hwdZyJAORV7B6Vg3uIxQ8qnJhCsU624NyjQrKcA=
263-
// @require https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@580df55/chromium/extension/components/buttons.js#sha256-FVFZm8EPXN3HPg89qxbWlfWc6AOQMA1BXtg9kbyTPIQ=
263+
// @require https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@64cf12b/chromium/extension/components/buttons.js#sha256-eXxLKmtD3a44Tq6OQ2af1+RYHytldxHY89VEtK+9qVc=
264264
// @require https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@d96f327/chromium/extension/components/icons.js#sha256-lrAx3C5E0gugnjUHqw/wLamG7aE9UTCfAJwM0WM8jjo=
265265
// @require https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@7c41d55/chromium/extension/components/modals.js#sha256-ETMRpzM8O1ymtxnc3dhYcogck069jEysN2PVqFeX74s=
266266
// @require https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@7ed283d/chromium/extension/components/tooltip.js#sha256-8ifKNrnKJ6b9oQ6aY7FM6SnqTYJ1IOUcvEbMHt8dVsA=
@@ -311,7 +311,7 @@
311311
version: GM_info.script.version, configKeyPrefix: `${env.site} Widescreen`,
312312
chatgptJSver: /chatgpt\.js@([\d.]+)/.exec(GM_info.scriptMetaStr)[1],
313313
urls: { update: 'https://gm.chatgptwidescreen.com' },
314-
latestResourceCommitHash: '5307431' // for cached app.json + sites.json5 + messages.json
314+
latestResourceCommitHash: 'ea045a9' // for cached app.json + sites.json5 + messages.json
315315
}
316316
app.urls.resourceHost = `https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@${app.latestResourceCommitHash}`
317317
const remoteAppData = await new Promise(resolve => xhr({
@@ -330,6 +330,7 @@
330330
menuLabel_hiddenHeader: 'Hidden Header',
331331
menuLabel_hiddenFooter: 'Hidden Footer',
332332
menuLabel_btnAnimations: 'Button Animations',
333+
menuLabel_btnVisibility: 'Button Visibility',
333334
menuLabel_modeNotifs: 'Mode Notifications',
334335
menuLabel_blockSpam: 'Spam Block',
335336
menuLabel_siteSettings: 'Site Settings',
@@ -359,6 +360,7 @@
359360
helptip_hiddenFooter: 'Hide site footer',
360361
helptip_hiddenHeader: 'Hide site header',
361362
helptip_btnAnimations: 'Animate chatbar buttons on hover',
363+
helptip_btnVisibility: 'Show custom buttons in chatbar',
362364
helptip_modeNotifs: 'Show notifications when toggling modes/settings',
363365
helptip_blockSpam: 'Hide spam banners from cluttering the page',
364366
helptip_enableDisable: 'Enable/disable',
@@ -808,7 +810,7 @@
808810
update.style.tweaks() // sync TCB/NCB/HH/HF/BA
809811
update.style.chatbar() // sync WCB
810812
chatbar.tweak() // update ChatGPT chatbar inner width or hack other sites' button positions
811-
buttons.insert() // since .remove()'d when script disabled
813+
buttons[config.btnsVisible ? 'insert' : 'remove']() // update button visibility
812814
if (options?.updatedKey == 'btnAnimationsDisabled' && !config.btnAnimationsDisabled) // apply/remove fx
813815
// ...to visually signal location + preview fx applied by Button Animations toggle-on
814816
buttons.animate()
@@ -892,7 +894,7 @@
892894
update.style.chatbar() ; document.head.append(chatbarStyle)
893895

894896
// Insert BUTTONS
895-
if (!config[`${env.site}Disabled`]) {
897+
if (!config[`${env.site}Disabled`] && config.btnsVisible) {
896898
buttons.insert()
897899

898900
// Restore PREV SESSION's state
@@ -909,7 +911,7 @@
909911
new MutationObserver(async () => {
910912

911913
// Maintain button visibility on nav
912-
if (config[`${env.site}Disabled`]) return
914+
if (config[`${env.site}Disabled`] || !buttons.visible) return
913915
else if (!buttons.fullscreen?.isConnected && !chatgpt.canvasIsOpen()
914916
&& await chatbar.get() && buttons.state.status != 'inserting'
915917
) { buttons.state.status = 'missing' ; buttons.insert() }

0 commit comments

Comments
 (0)