Skip to content

Commit

Permalink
Removed no-longer used menu-entry IDs from toggle selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlui committed Jan 16, 2025
1 parent 339b586 commit 538232b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
6 changes: 3 additions & 3 deletions amazongpt/greasemonkey/amazongpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// @description Adds the magic of AI to Amazon shopping
// @author KudoAI
// @namespace https://kudoai.com
// @version 2025.1.15.17
// @version 2025.1.15.18
// @license MIT
// @icon https://amazongpt.kudoai.com/assets/images/icons/amazongpt/black-gold-teal/icon48.png?v=0fddfc7
// @icon64 https://amazongpt.kudoai.com/assets/images/icons/amazongpt/black-gold-teal/icon64.png?v=0fddfc7
Expand Down Expand Up @@ -2393,8 +2393,8 @@
notify(`${app.msgs.menuLabel_proxyAPImode} ${menu.state.words[+config.proxyAPIenabled]}`)
menu.refresh()
if (modals.settings.get()) { // update visual states of Settings toggles
const proxyToggle = document.querySelector('[id*=proxy][id*=menu-entry] input'),
streamingToggle = document.querySelector('[id*=streaming][id*=menu-entry] input')
const proxyToggle = document.querySelector('[id*=proxy] input'),
streamingToggle = document.querySelector('[id*=streaming] input')
if (proxyToggle.checked != config.proxyAPIenabled) // Proxy state out-of-sync (from using toolbar menu)
modals.settings.toggle.switch(proxyToggle)
if (streamingToggle.checked && !config.proxyAPIenabled // Streaming checked but OpenAI mode
Expand Down
14 changes: 7 additions & 7 deletions bravegpt/greasemonkey/bravegpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
// @description:zu Yengeza izimpendulo ze-AI ku-Brave Search (inikwa amandla yi-GPT-4o!)
// @author KudoAI
// @namespace https://kudoai.com
// @version 2025.1.15.20
// @version 2025.1.15.21
// @license MIT
// @icon https://assets.bravegpt.com/images/icons/bravegpt/icon48.png?v=df624b0
// @icon64 https://assets.bravegpt.com/images/icons/bravegpt/icon64.png?v=df624b0
Expand Down Expand Up @@ -2920,7 +2920,7 @@
appDiv.classList[config.anchored ? 'add' : 'remove']('anchored')
update.rqVisibility() ; update.answerPreMaxHeight() ; update.bylineVisibility()
if (modals.settings.get()) { // update visual state of Settings toggle
const anchorToggle = document.querySelector('[id*=anchor][id*=menu-entry] input')
const anchorToggle = document.querySelector('[id*=anchor] input')
if (anchorToggle.checked != config.anchored) modals.settings.toggle.switch(anchorToggle)
}
menus.pin.topPos = menus.pin.rightPos = null
Expand Down Expand Up @@ -2952,7 +2952,7 @@
['prefix', 'suffix'].forEach(mode => config[`${mode}Enabled`] && toggle.manualGet(mode))
notify(`${settings.controls.autoGetDisabled.label} ${menu.state.words[+!config.autoGetDisabled]}`)
if (modals.settings.get()) { // update visual state of Settings toggle
const autoGetToggle = document.querySelector('[id*=autoGet][id*=menu-entry] input')
const autoGetToggle = document.querySelector('[id*=autoGet] input')
if (autoGetToggle.checked == config.autoGetDisabled) modals.settings.toggle.switch(autoGetToggle)
}
},
Expand Down Expand Up @@ -2991,7 +2991,7 @@
if (config[modeKey] && !config.autoGetDisabled) toggle.autoGet() // disable Auto-Get mode if enabled
notify(`${settings.controls[modeKey].label} ${menu.state.words[+config[modeKey]]}`)
if (modals.settings.get()) { // update visual state of Settings toggle
const modeToggle = document.querySelector(`[id*=${modeKey}][id*=menu-entry] input`)
const modeToggle = document.querySelector(`[id*=${modeKey}] input`)
if (modeToggle.checked != config[modeKey]) modals.settings.toggle.switch(modeToggle)
}
},
Expand All @@ -3018,8 +3018,8 @@
notify(`${app.msgs.menuLabel_proxyAPImode} ${menu.state.words[+config.proxyAPIenabled]}`)
menu.refresh()
if (modals.settings.get()) { // update visual states of Settings toggles
const proxyToggle = document.querySelector('[id*=proxy][id*=menu-entry] input'),
streamingToggle = document.querySelector('[id*=streaming][id*=menu-entry] input')
const proxyToggle = document.querySelector('[id*=proxy] input'),
streamingToggle = document.querySelector('[id*=streaming] input')
if (proxyToggle.checked != config.proxyAPIenabled) // Proxy state out-of-sync (from using toolbar menu)
modals.settings.toggle.switch(proxyToggle)
if (streamingToggle.checked && !config.proxyAPIenabled // Streaming checked but OpenAI mode
Expand Down Expand Up @@ -3056,7 +3056,7 @@
update.answerPreMaxHeight() ; update.bylineVisibility()
if (mode == 'wider') icons.widescreen.update() // toggle icons everywhere
if (modals.settings.get()) { // update visual state of Settings toggle
const stickySidebarToggle = document.querySelector('[id*=sticky][id*=menu-entry] input')
const stickySidebarToggle = document.querySelector('[id*=sticky] input')
if (stickySidebarToggle.checked != config.stickySidebar)
modals.settings.toggle.switch(stickySidebarToggle)
}
Expand Down
14 changes: 7 additions & 7 deletions duckduckgpt/greasemonkey/duckduckgpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
// @description:zu Yengeza izimpendulo ze-AI ku-DuckDuckGo (inikwa amandla yi-GPT-4o!)
// @author KudoAI
// @namespace https://kudoai.com
// @version 2025.1.15.20
// @version 2025.1.15.21
// @license MIT
// @icon https://assets.ddgpt.com/images/icons/duckduckgpt/icon48.png?v=06af076
// @icon64 https://assets.ddgpt.com/images/icons/duckduckgpt/icon64.png?v=06af076
Expand Down Expand Up @@ -2795,7 +2795,7 @@
appDiv.classList[config.anchored ? 'add' : 'remove']('anchored')
update.rqVisibility() ; update.answerPreMaxHeight() ; update.bylineVisibility() ; update.chatbarWidth()
if (modals.settings.get()) { // update visual state of Settings toggle
const anchorToggle = document.querySelector('[id*=anchor][id*=menu-entry] input')
const anchorToggle = document.querySelector('[id*=anchor] input')
if (anchorToggle.checked != config.anchored) modals.settings.toggle.switch(anchorToggle)
}
menus.pin.topPos = menus.pin.rightPos = null
Expand Down Expand Up @@ -2827,7 +2827,7 @@
['prefix', 'suffix'].forEach(mode => config[`${mode}Enabled`] && toggle.manualGet(mode))
notify(`${settings.controls.autoGet.label} ${menu.state.words[+config.autoGet]}`)
if (modals.settings.get()) { // update visual state of Settings toggle
const autoGetToggle = document.querySelector('[id*=autoGet][id*=menu-entry] input')
const autoGetToggle = document.querySelector('[id*=autoGet] input')
if (autoGetToggle.checked != config.autoGet) modals.settings.toggle.switch(autoGetToggle)
}
},
Expand Down Expand Up @@ -2866,7 +2866,7 @@
if (config[modeKey] && config.autoGet) toggle.autoGet() // disable Auto-Get mode if enabled
notify(`${settings.controls[modeKey].label} ${menu.state.words[+config[modeKey]]}`)
if (modals.settings.get()) { // update visual state of Settings toggle
const modeToggle = document.querySelector(`[id*=${modeKey}][id*=menu-entry] input`)
const modeToggle = document.querySelector(`[id*=${modeKey}] input`)
if (modeToggle.checked != config[modeKey]) modals.settings.toggle.switch(modeToggle)
}
},
Expand All @@ -2893,8 +2893,8 @@
notify(`${app.msgs.menuLabel_proxyAPImode} ${menu.state.words[+config.proxyAPIenabled]}`)
menu.refresh()
if (modals.settings.get()) { // update visual states of Settings toggles
const proxyToggle = document.querySelector('[id*=proxy][id*=menu-entry] input'),
streamingToggle = document.querySelector('[id*=streaming][id*=menu-entry] input')
const proxyToggle = document.querySelector('[id*=proxy] input'),
streamingToggle = document.querySelector('[id*=streaming] input')
if (proxyToggle.checked != config.proxyAPIenabled) // Proxy state out-of-sync (from using toolbar menu)
modals.settings.toggle.switch(proxyToggle)
if (streamingToggle.checked && !config.proxyAPIenabled // Streaming checked but OpenAI mode
Expand Down Expand Up @@ -2931,7 +2931,7 @@
update.answerPreMaxHeight() ; update.bylineVisibility() ; update.chatbarWidth()
if (mode == 'wider') icons.widescreen.update() // toggle icons everywhere
if (modals.settings.get()) { // update visual state of Settings toggle
const stickySidebarToggle = document.querySelector('[id*=sticky][id*=menu-entry] input')
const stickySidebarToggle = document.querySelector('[id*=sticky] input')
if (stickySidebarToggle.checked != config.stickySidebar)
modals.settings.toggle.switch(stickySidebarToggle)
}
Expand Down
14 changes: 7 additions & 7 deletions googlegpt/greasemonkey/googlegpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
// @description:zu Yengeza izimpendulo ze-AI ku-Google Search (inikwa amandla yi-Google Gemma + GPT-4o!)
// @author KudoAI
// @namespace https://kudoai.com
// @version 2025.1.15.17
// @version 2025.1.15.18
// @license MIT
// @icon https://assets.googlegpt.io/images/icons/googlegpt/black/icon48.png?v=59409b2
// @icon64 https://assets.googlegpt.io/images/icons/googlegpt/black/icon64.png?v=59409b2
Expand Down Expand Up @@ -3139,7 +3139,7 @@
update.bylineVisibility() ; appDiv.removeEventListener('transitionend', onTransitionEnd)
}})
if (modals.settings.get()) { // update visual state of Settings toggle
const anchorToggle = document.querySelector('[id*=anchor][id*=menu-entry] input')
const anchorToggle = document.querySelector('[id*=anchor] input')
if (anchorToggle.checked != config.anchored) modals.settings.toggle.switch(anchorToggle)
}
menus.pin.topPos = menus.pin.rightPos = null
Expand Down Expand Up @@ -3171,7 +3171,7 @@
['prefix', 'suffix'].forEach(mode => config[`${mode}Enabled`] && toggle.manualGet(mode))
notify(`${settings.controls.autoGet.label} ${menu.state.words[+config.autoGet]}`)
if (modals.settings.get()) { // update visual state of Settings toggle
const autoGetToggle = document.querySelector('[id*=autoGet][id*=menu-entry] input')
const autoGetToggle = document.querySelector('[id*=autoGet] input')
if (autoGetToggle.checked != config.autoGet) modals.settings.toggle.switch(autoGetToggle)
}
},
Expand Down Expand Up @@ -3210,7 +3210,7 @@
if (config[modeKey] && config.autoGet) toggle.autoGet() // disable Auto-Get mode if enabled
notify(`${settings.controls[modeKey].label} ${menu.state.words[+config[modeKey]]}`)
if (modals.settings.get()) { // update visual state of Settings toggle
const modeToggle = document.querySelector(`[id*=${modeKey}][id*=menu-entry] input`)
const modeToggle = document.querySelector(`[id*=${modeKey}] input`)
if (modeToggle.checked != config[modeKey]) modals.settings.toggle.switch(modeToggle)
}
},
Expand All @@ -3237,8 +3237,8 @@
notify(`${app.msgs.menuLabel_proxyAPImode} ${menu.state.words[+config.proxyAPIenabled]}`)
menu.refresh()
if (modals.settings.get()) { // update visual states of Settings toggles
const proxyToggle = document.querySelector('[id*=proxy][id*=menu-entry] input'),
streamingToggle = document.querySelector('[id*=streaming][id*=menu-entry] input')
const proxyToggle = document.querySelector('[id*=proxy] input'),
streamingToggle = document.querySelector('[id*=streaming] input')
if (proxyToggle.checked != config.proxyAPIenabled) // Proxy state out-of-sync (from using toolbar menu)
modals.settings.toggle.switch(proxyToggle)
if (streamingToggle.checked && !config.proxyAPIenabled // Streaming checked but OpenAI mode
Expand Down Expand Up @@ -3275,7 +3275,7 @@
update.answerPreMaxHeight() ; update.bylineVisibility() ; update.chatbarWidth()
if (mode == 'wider') icons.widescreen.update() // toggle icons everywhere
if (modals.settings.get()) { // update visual state of Settings toggle
const stickySidebarToggle = document.querySelector('[id*=sticky][id*=menu-entry] input')
const stickySidebarToggle = document.querySelector('[id*=sticky] input')
if (stickySidebarToggle.checked != config.stickySidebar)
modals.settings.toggle.switch(stickySidebarToggle)
}
Expand Down

0 comments on commit 538232b

Please sign in to comment.