Skip to content

Commit 3986094

Browse files
committed
Moved app.config init out of settings ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/bravegpt]
1 parent 085856e commit 3986094

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

chatgpt/bravegpt/bravegpt.user.js

Lines changed: 3 additions & 4 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.6
151+
// @version 2026.1.26.7
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
@@ -333,9 +333,9 @@
333333
apis.AIchatOS.userID = '#/chat/' + Date.now()
334334

335335
// Init SETTINGS
336+
app.config ??= {}
336337
window.settings = {
337338
load(...keys) {
338-
app.config ??= {}
339339
keys.flat().forEach(key =>
340340
app.config[key] = processKey(key, GM_getValue(`${app.configKeyPrefix}_${key}`, undefined)))
341341
function processKey(key, val) {
@@ -347,8 +347,7 @@
347347
return val ?? (ctrl?.defaultVal ?? (ctrl?.type == 'slider' ? 100 : false))
348348
}
349349
},
350-
save(key, val) {
351-
app.config ??= {} ; GM_setValue(`${app.configKeyPrefix}_${key}`, val) ; app.config[key] = val },
350+
save(key, val) { GM_setValue(`${app.configKeyPrefix}_${key}`, val) ; app.config[key] = val },
352351
typeIsEnabled(key) {
353352
const reInvertFlags = /disabled|hidden/i
354353
return reInvertFlags.test(key) // flag in control key name

0 commit comments

Comments
 (0)