Skip to content

Commit cdfd483

Browse files
committed
Made auto-gen toggle-on do it if Standby mode ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/duckduckgpt]
1 parent 7935841 commit cdfd483

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

chatgpt/duckduckgpt/duckduckgpt.user.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
// @description:zu Yengeza izimpendulo ze-AI ku-DuckDuckGo (inikwa amandla yi-GPT-4o!)
149149
// @author KudoAI
150150
// @namespace https://kudoai.com
151-
// @version 2025.9.23.1
151+
// @version 2025.9.24
152152
// @license MIT
153153
// @icon https://assets.ddgpt.com/images/icons/app/icon48.png?v=533ce0f
154154
// @icon64 https://assets.ddgpt.com/images/icons/app/icon64.png?v=533ce0f
@@ -1036,12 +1036,14 @@
10361036
const validModes = ['get', 'summarize'], modeKey = `auto${log.toTitleCase(mode)}`
10371037
let conflictingModeToggled = false // to extend this notif duration
10381038
settings.save(modeKey, !config[modeKey])
1039-
if (config[modeKey]) { // this Auto-Gen mode toggled on, disable other one + Manual-Gen
1039+
if (config[modeKey]) { // this Auto-Gen mode toggled on, disable other one + Manual-Gen + do it
10401040
const otherMode = validModes[+(mode == validModes[0])]
10411041
if (config[`auto${log.toTitleCase(otherMode)}`]) {
10421042
toggle.autoGen(otherMode) ; conflictingModeToggled = true }
10431043
['prefix', 'suffix'].forEach(mode => {
10441044
if (config[`${mode}Enabled`]) { toggle.manualGen(mode) ; conflictingModeToggled = true }})
1045+
app.div.querySelector(
1046+
`button[class*=standby]:has(svg.${mode == 'get' ? 'send' : 'summarize' })`)?.click()
10451047
}
10461048
feedback.notify(`${settings.controls[modeKey].label} ${menus.toolbar.state.words[+config[modeKey]]}`,
10471049
null, conflictingModeToggled ? 2.75 : null) // +1s duration if conflicting mode notif shown

0 commit comments

Comments
 (0)