Skip to content

Commit 971fb3d

Browse files
committed
Bumped JS resources, updated app.config key refs ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/bravegpt]
1 parent c85c87b commit 971fb3d

1 file changed

Lines changed: 18 additions & 19 deletions

File tree

chatgpt/bravegpt/bravegpt.user.js

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
// @description:zu Yengeza izimpendulo ze-AI ku-Brave Search (inikwa amandla yi-GPT-4o!)
149149
// @author KudoAI
150150
// @namespace https://kudoai.com
151-
// @version 2026.1.26.1
151+
// @version 2026.1.26.3
152152
// @license MIT
153153
// @icon https://assets.bravegpt.com/images/icons/app/icon48.png?v=e8ca7c2
154154
// @icon64 https://assets.bravegpt.com/images/icons/app/icon64.png?v=e8ca7c2
@@ -198,20 +198,19 @@
198198
// @require https://cdn.jsdelivr.net/npm/json5@2.2.3/dist/index.min.js#sha256-S7ltnVPzgKyAGBlBG4wQhorJqYTehj5WQCrADCKJufE=
199199
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@30ce038/assets/js/chatbot/components/buttons.js#sha256-bam0MF6WM+Lyt5Wgop3rfHPYZHmOPXq4ZxbUXort2+M=
200200
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@30ce038/assets/js/chatbot/components/icons.js#sha256-nAcuQD4FVFzUN1pS6pOjw2V3IvkDwYV+P3m5IN8nsdo=
201-
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@30ce038/assets/js/chatbot/components/menus.js#sha256-3c/0V6/lug+yy7AGCI99Em7G+QGYcnfYpbN3VZSv4go=
201+
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@787f07b/assets/js/chatbot/components/menus.js#sha256-YaV3USVJvvChUwPjoF2jwRwbKVBdjoFfLS6ThEnZchE=
202202
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@30ce038/assets/js/chatbot/components/replyBubble.js#sha256-zN/oMInc63biUtC+qNfP48vntQiEw2zyCIVszeBxLmg=
203203
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@30ce038/assets/js/chatbot/components/tooltip.js#sha256-/xPw7DnS8F9dBH/s0ffMrErweHgFBeKpkUM4tUDy4vo=
204-
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@30ce038/assets/js/chatbot/lib/api.js#ha256-9mC3x8yqdVp3WpWMreBsTzunXu1+VSm0bXvVOQz3ODs=
204+
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@787f07b/assets/js/chatbot/lib/api.js#sha256-9mC3x8yqdVp3WpWMreBsTzunXu1+VSm0bXvVOQz3ODs=
205205
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@30ce038/assets/js/chatbot/lib/feedback.js#sha256-ri8OzNa/8sQINDn7bW84F2OuVYZxubMSm/Zpli/cPnQ=
206206
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@30ce038/assets/js/chatbot/lib/log.js#sha256-puXwoSKgog6EhgDzlJrAzMnGRM6kLMTT8NF0jYncIt8=
207207
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@30ce038/assets/js/chatbot/lib/prompts.js#sha256-Z9QsKpAcqSoclxyPTkPfe8/K3s9eDrbSYgumr/GYyLc=
208208
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@30ce038/assets/js/chatbot/lib/session.js#sha256-cH2e3l2bZQRekQHxaeSShdNguqD41evEOkMrrVIydHQ=
209209
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@30ce038/assets/js/chatbot/lib/themes.js#sha256-NSiOkXoRC/fF8zdmnbIk9XL5tKWWP5MU2NOfdJ9G0NU=
210210
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@30ce038/assets/js/chatbot/lib/ui.js#sha256-+UnPhc4zxrdWEuLU8PFrnpAW9TFS2c1hOGbcby2HlEU=
211211
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@30ce038/assets/js/chatbot/lib/userscript.js#sha256-DTD+Tj/9angBw8/Q4e8PMz2SBwueqvNzeY8PwZlMgbs=
212-
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@ed7d80f/assets/js/lib/css.js/dist/css.min.js#sha256-BCcXA39Aq/Thsxgzl5di1FFCVQK5JiVQykPs8KBVxl8=
213-
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@ed7d80f/assets/js/lib/css.js/dist/css.min.js#sha256-BCcXA39Aq/Thsxgzl5di1FFCVQK5JiVQykPs8KBVxl8=
214-
// @require https://cdn.jsdelivr.net/gh/adamlui/ai-web-extensions@3683a79/assets/js/lib/dom.js/dist/dom.min.js#sha256-Xl5ghi373aMe12nN4vOKB+C5IJQY43AtjVAdB0K3Dag=
212+
// @require https://cdn.jsdelivr.net/gh/adamlui/userscripts@ff2baba/assets/js/lib/css.js/dist/css.min.js#sha256-zf9s8C0cZ/i+gnaTIUxa0+RpDYpsJVlyuV5L2q4KUdA=
213+
// @require https://cdn.jsdelivr.net/gh/adamlui/userscripts@ff2baba/assets/js/lib/dom.js/dist/dom.min.js#sha256-nTc2by3ZAz6AR7B8fOqjloJNETvjAepe15t2qlghMDo=
215214
// @require https://cdn.jsdelivr.net/npm/generate-ip@2.4.5/dist/generate-ip.min.js#sha256-PI9snFGy1YvX4fiT8SJ01RveRSa6vZujEJxk8y/jvVs=
216215
// @require https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js#sha256-g3pvpbDHNrUrveKythkPMF2j/J7UFoHbUyFQcFe1yEY=
217216
// @require https://cdn.jsdelivr.net/npm/katex@0.16.10/dist/katex.min.js#sha256-n0UwfFeU7SR6DQlfOmLlLvIhWmeyMnIDp/2RmVmuedE=
@@ -353,7 +352,7 @@
353352
const reInvertFlags = /disabled|hidden/i
354353
return reInvertFlags.test(key) // flag in control key name
355354
&& !reInvertFlags.test(this.controls[key]?.label || '') // but not in label msg key name
356-
? !config[key] : app.config[key] // so invert since flag reps opposite type state, else don't
355+
? !app.config[key] : app.config[key] // so invert since flag reps opposite type state, else don't
357356
}
358357
}
359358
settings.load('debugMode') ; log.debug('Initializing settings...')
@@ -415,12 +414,12 @@
415414
about: { type: 'modal', icon: 'questionMarkCircle',
416415
label: `${app.msgs.menuLabel_about} ${app.name}...` }
417416
}})
418-
Object.assign(config, { lineHeightRatio: 1.313, maxFontSize: 24, minFontSize: 11 })
417+
Object.assign(app.config, { lineHeightRatio: 1.313, maxFontSize: 24, minFontSize: 11 })
419418
settings.load(Object.keys(settings.controls), 'expanded', 'fontSize', 'minimized')
420419
if (!app.config.replyLang) settings.save('replyLang', env.browser.language) // init reply language if unset
421420
if (!app.config.fontSize) settings.save('fontSize', 12.8791) // init reply font size if unset
422421
if (!env.scriptManager.supportsStreaming) settings.save('streamingDisabled', true) // disable Streaming in unspported env
423-
log.debug(`Success! config = ${log.prettifyObj(config)}`)
422+
log.debug(`Success! app.config = ${log.prettifyObj(app.config)}`)
424423

425424
// Define UI functions
426425

@@ -998,28 +997,28 @@
998997
const anchorToggle = document.querySelector('[id*=anchor] input')
999998
if (anchorToggle.checked != app.config.anchored) modals.settings.toggle.switch(anchorToggle)
1000999
}
1001-
feedback.notify(`${app.msgs.mode_anchor} ${menus.toolbar.state.words[+config.anchored]}`,
1000+
feedback.notify(`${app.msgs.mode_anchor} ${menus.toolbar.state.words[+app.config.anchored]}`,
10021001
undefined, sidebarModeToggled ? 2.75 : undefined) // +1s duration if conflicting mode notif shown
10031002
},
10041003

10051004
animations(layer) {
10061005
const configKey = `${layer}AnimationsDisabled`
1007-
settings.save(configKey, !config[configKey])
1006+
settings.save(configKey, !app.config[configKey])
10081007
update.appStyle() ; if (layer == 'bg') { update.risingParticles() ; update.replyPrefix() }
10091008
if (layer == 'fg' && modals.settings.get()) { // toggle ticker-scroll of About status label
10101009
const aboutStatusLabel = document.querySelector('#about-settings-entry > span > div')
10111010
aboutStatusLabel.innerHTML = modals.settings.aboutContent[
10121011
app.config.fgAnimationsDisabled ? 'short' : 'long']
10131012
aboutStatusLabel.style.float = app.config.fgAnimationsDisabled ? 'right' : ''
10141013
}
1015-
feedback.notify(`${settings.controls[configKey].label} ${menus.toolbar.state.words[+!config[configKey]]}`)
1014+
feedback.notify(`${settings.controls[configKey].label} ${menus.toolbar.state.words[+!app.config[configKey]]}`)
10161015
},
10171016

10181017
autoGen(mode) {
10191018
const validModes = ['get', 'summarize'],
10201019
modeKey = `auto${log.toTitleCase(mode)}${ mode == 'get' ? 'Disabled' : '' }`
10211020
let conflictingModeToggled = false // to extend this notif duration
1022-
settings.save(modeKey, !config[modeKey])
1021+
settings.save(modeKey, !app.config[modeKey])
10231022
if (settings.typeIsEnabled(modeKey)) { // this Auto-Gen mode toggled on, disable other one + Manual-Gen + do it
10241023
const otherMode = validModes[+(mode == validModes[0])],
10251024
otherModeKey = `auto${log.toTitleCase(otherMode)}${ otherMode == 'get' ? 'Disabled' : '' }`
@@ -1054,13 +1053,13 @@
10541053
manualGen(mode) { // Prefix/Suffix modes
10551054
const modeKey = `${mode}Enabled`
10561055
let autoGenToggled = false // to extend this notif duration
1057-
settings.save(modeKey, !config[modeKey])
1056+
settings.save(modeKey, !app.config[modeKey])
10581057
if (app.config[modeKey]) // Manual-Gen toggled on, disable all Auto-Gen
10591058
['get', 'summarize'].forEach(mode => {
10601059
if (settings.typeIsEnabled(`auto${log.toTitleCase(mode)}${ mode == 'get' ? 'Disabled' : '' }`)) {
10611060
toggle.autoGen(mode) ; autoGenToggled = true }
10621061
})
1063-
feedback.notify(`${settings.controls[modeKey].label} ${menus.toolbar.state.words[+config[modeKey]]}`,
1062+
feedback.notify(`${settings.controls[modeKey].label} ${menus.toolbar.state.words[+app.config[modeKey]]}`,
10641063
undefined, autoGenToggled ? 2.75 : undefined) // +1s duration if conflicting mode notif shown)
10651064
if (modals.settings.get()) { // update visual state of Settings toggle
10661065
const modeToggle = document.querySelector(`[id*=${modeKey}] input`)
@@ -1088,7 +1087,7 @@
10881087

10891088
proxyMode() {
10901089
settings.save('proxyAPIenabled', !app.config.proxyAPIenabled)
1091-
feedback.notify(`${app.msgs.menuLabel_proxyAPImode} ${menus.toolbar.state.words[+config.proxyAPIenabled]}`)
1090+
feedback.notify(`${app.msgs.menuLabel_proxyAPImode} ${menus.toolbar.state.words[+app.config.proxyAPIenabled]}`)
10921091
menus.toolbar.refresh()
10931092
if (modals.settings.get()) { // update visual states of Settings toggles
10941093
const proxyToggle = document.querySelector('[id*=proxy] input'),
@@ -1126,7 +1125,7 @@
11261125
let anchorModeDisabled = false // to extend this notif duration
11271126

11281127
// Save new state + disable incompatible Anchor mode
1129-
if (state == 'on' || !state && !config[configKeyName]) { // toggle on
1128+
if (state == 'on' || !state && !app.config[configKeyName]) { // toggle on
11301129
if (mode == 'sticky' && app.config.anchored) { toggle.anchorMode() ; anchorModeDisabled = true }
11311130
settings.save(configKeyName, true)
11321131
} else settings.save(configKeyName, false)
@@ -1147,7 +1146,7 @@
11471146
if (mode == 'sticky' && prevStickyState == app.config.stickySidebar) return
11481147
feedback.notify(
11491148
`${ app.msgs[`menuLabel_${mode}Sidebar`] || log.toTitleCase(mode) + ' Sidebar' } ${
1150-
menus.toolbar.state.words[+config[configKeyName]]}`,
1149+
menus.toolbar.state.words[+app.config[configKeyName]]}`,
11511150
undefined, anchorModeDisabled ? 2.75 : undefined // +1s duration if conflicting mode notif shown
11521151
)
11531152
},
@@ -2328,7 +2327,7 @@
23282327

23292328
// ...or generically toggle/notify
23302329
else {
2331-
settings.save(key, !config[key]) // update config
2330+
settings.save(key, !app.config[key]) // update config
23322331
feedback.notify(`${settings.controls[key].label} ${
23332332
menus.toolbar.state.words[+(key.includes('Disabled') != app.config[key])]}`)
23342333
}

0 commit comments

Comments
 (0)