Skip to content

Commit 60de612

Browse files
committed
Eliminated toolbarMenu.ids init to condense .register() ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/amazongpt]
1 parent a92b997 commit 60de612

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

chatgpt/amazongpt/amazongpt.user.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// @description Adds the magic of AI to Amazon shopping
44
// @author KudoAI
55
// @namespace https://kudoai.com
6-
// @version 2025.3.31.7
6+
// @version 2025.4.1
77
// @license MIT
88
// @icon https://cdn.jsdelivr.net/gh/KudoAI/amazongpt@0fddfc7/assets/images/icons/amazongpt/black-gold-teal/icon48.png
99
// @icon64 https://cdn.jsdelivr.net/gh/KudoAI/amazongpt@0fddfc7/assets/images/icons/amazongpt/black-gold-teal/icon64.png
@@ -426,7 +426,7 @@
426426
// Define MENU functions
427427

428428
const toolbarMenu = {
429-
ids: [], state: {
429+
state: {
430430
symbols: ['❌', '✔️'], separator: env.scriptManager.name == 'Tampermonkey' ? ' — ' : ': ',
431431
words: [app.msgs.state_off.toUpperCase(), app.msgs.state_on.toUpperCase()]
432432
},
@@ -443,8 +443,8 @@
443443
const pmLabel = this.state.symbols[+config.proxyAPIenabled] + ' '
444444
+ settings.controls.proxyAPIenabled.label + ' '
445445
+ this.state.separator + this.state.words[+config.proxyAPIenabled]
446-
this.ids.push(GM_registerMenuCommand(pmLabel, toggle.proxyMode,
447-
env.scriptManager.supportsTooltips ? { title: settings.controls.proxyAPIenabled.helptip } : undefined));
446+
this.ids = [GM_registerMenuCommand(pmLabel, toggle.proxyMode,
447+
env.scriptManager.supportsTooltips ? { title: settings.controls.proxyAPIenabled.helptip } : undefined)];
448448

449449
// Add About/Settings entries
450450
['about', 'settings'].forEach(entryType => this.ids.push(GM_registerMenuCommand(

0 commit comments

Comments
 (0)