Skip to content

Commit

Permalink
Consolidated entry creation routines in menu.register() ↞ [auto-syn…
Browse files Browse the repository at this point in the history
  • Loading branch information
kudo-sync-bot committed Dec 23, 2024
1 parent 8a7c0be commit 25c0521
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions chatgpt/bravegpt/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 2024.12.23
// @version 2024.12.23.1
// @license MIT
// @icon https://media.bravegpt.com/images/icons/bravegpt/icon48.png?0a9e287
// @icon64 https://media.bravegpt.com/images/icons/bravegpt/icon64.png?0a9e287
Expand Down Expand Up @@ -641,17 +641,13 @@
+ settings.controls.proxyAPIenabled.label + ' '
+ menu.state.separator + menu.state.words[+config.proxyAPIenabled]
menu.ids.push(GM_registerMenuCommand(pmLabel, toggle.proxyMode,
tooltipsSupported ? { title: settings.controls.proxyAPIenabled.helptip } : undefined))
tooltipsSupported ? { title: settings.controls.proxyAPIenabled.helptip } : undefined));

// Add About entry
const aboutLabel = `💡 ${settings.controls.about.label}`
menu.ids.push(GM_registerMenuCommand(aboutLabel, () => modals.open('about'),
tooltipsSupported ? { title: ' ' } : undefined ))

// Add Settings entry
const settingsLabel = `⚙️ ${app.msgs.menuLabel_settings}`
menu.ids.push(GM_registerMenuCommand(settingsLabel, () => modals.open('settings'),
tooltipsSupported ? { title: ' ' } : undefined))
// Add About/Settings entries
['about', 'settings'].forEach(entryType => menu.ids.push(GM_registerMenuCommand(
entryType == 'about' ? `💡 ${settings.controls.about.label}` : `⚙️ ${app.msgs.menuLabel_settings}`,
() => modals.open(entryType), tooltipsSupported ? { title: ' ' } : undefined
)))
},

refresh() {
Expand Down

0 comments on commit 25c0521

Please sign in to comment.