Skip to content

Commit 5daa26b

Browse files
committed
Lowered actions/checkout to 6.0.1 til actions/checkout#2365 fixed ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/chatgpt-infinity]
1 parent d74ea83 commit 5daa26b

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

chatgpt/chatgpt-infinity/chatgpt-infinity.user.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,9 @@
308308
// Init SETTINGS
309309
settings.load(Object.keys(settings.controls).filter(key => key != 'infinityMode')) // exclude infinityMode...
310310
settings.save('infinityMode', false) // ...to always init as false
311-
if (!config.replyLanguage) settings.save('replyLanguage', env.browser.language) // init reply language if unset
312-
if (!config.replyTopic) settings.save('replyTopic', app.msgs.menuLabel_all) // init reply topic if unset
313-
if (!config.replyInterval) settings.save('replyInterval', 7) // init refresh interval to 7 secs if unset
311+
if (!app.config.replyLanguage) settings.save('replyLanguage', env.browser.language) // init reply language if unset
312+
if (!app.config.replyTopic) settings.save('replyTopic', app.msgs.menuLabel_all) // init reply topic if unset
313+
if (!app.config.replyInterval) settings.save('replyInterval', 7) // init refresh interval to 7 secs if unset
314314

315315
// Define MENU functions
316316

@@ -343,14 +343,14 @@
343343
entryData.symbol || this.state.symbols[+settings.typeIsEnabled(key)] } ${entryData.label} ${
344344
entryData.type == 'toggle' ? this.state.separator
345345
+ this.state.words[+settings.typeIsEnabled(key)]
346-
: entryData.type == 'slider' ? ': ' + config[key] + entryData.labelSuffix || ''
346+
: entryData.type == 'slider' ? ': ' + app.config[key] + entryData.labelSuffix || ''
347347
: entryData.status ? ` — ${entryData.status}` : '' }`
348348
return GM_registerMenuCommand(menuLabel, () => {
349349
if (entryData.type == 'toggle') {
350350
settings.save(key, !config[key])
351351
feedback.notify(`${entryData.label}: ${this.state.words[+settings.typeIsEnabled(key)]}`)
352352
} else if (key == 'replyLanguage') {
353-
let replyLang = prompt(`${app.msgs.prompt_updateReplyLang}:`, config.replyLanguage)
353+
let replyLang = prompt(`${app.msgs.prompt_updateReplyLang}:`, app.config.replyLanguage)
354354
if (replyLang == null) return // user cancelled so do nothing
355355
else if (!/\d/.test(replyLang)) { // valid reply language set
356356
replyLang = ( // auto-case for menu/alert aesthetics
@@ -364,7 +364,7 @@
364364
}
365365
} else if (key == 'replyTopic') {
366366
let replyTopic = prompt(( app.msgs.prompt_updateReplyTopic )
367-
+ ' (' + ( app.msgs.prompt_orEnter ) + ' \'ALL\'):', config.replyTopic)
367+
+ ' (' + ( app.msgs.prompt_orEnter ) + ' \'ALL\'):', app.config.replyTopic)
368368
if (replyTopic != null) { // user didn't cancel
369369
replyTopic = string.toTitleCase(replyTopic.toString()) // for menu/alert aesthetics
370370
settings.save('replyTopic',
@@ -376,7 +376,7 @@
376376
)
377377
}
378378
} else if (key == 'replyInterval') {
379-
const replyInterval = prompt(`${app.msgs.prompt_updateReplyInt}:`, config.replyInterval)
379+
const replyInterval = prompt(`${app.msgs.prompt_updateReplyInt}:`, app.config.replyInterval)
380380
if (replyInterval == null) return // user cancelled so do nothing
381381
else if (!isNaN(parseInt(replyInterval, 10)) && parseInt(replyInterval, 10) > 4) {
382382
settings.save('replyInterval', parseInt(replyInterval, 10))
@@ -487,7 +487,7 @@
487487
// Add LISTENER to auto-disable Infinity Mode
488488
if ('hidden' in document) // ...if Page Visibility API supported
489489
document.onvisibilitychange = () => {
490-
if (config.infinityMode) {
490+
if (app.config.infinityMode) {
491491
settings.save('infinityMode', false) ; sync.configToUI({ updatedKey: 'infinityMode' }) }
492492
}
493493

@@ -497,14 +497,14 @@
497497
toggles.sidebar.insert()
498498

499499
// Auto-start if enabled
500-
if (config.autoStart) {
500+
if (app.config.autoStart) {
501501
settings.save('infinityMode', true) ; sync.configToUI({ updatedKey: 'infinityMode' })
502502
feedback.notify(`${app.msgs.menuLabel_autoStart}: ${app.msgs.state_on.toUpperCase()}`)
503503
}
504504

505505
// Monitor NODE CHANGES to maintain sidebar toggle visibility
506506
new MutationObserver(() => {
507-
if (!config.toggleHidden && document.querySelector(chatgpt.selectors.sidebar)
507+
if (!app.config.toggleHidden && document.querySelector(chatgpt.selectors.sidebar)
508508
&& !document.querySelector(`.${toggles.sidebar.class}`)
509509
&& toggles.sidebar.status != 'inserting'
510510
) { toggles.sidebar.status = 'missing' ; toggles.sidebar.insert() }

0 commit comments

Comments
 (0)