Skip to content

Commit

Permalink
Removed unuseful registerOptions from menu.register() since no he…
Browse files Browse the repository at this point in the history
…lptips yet
  • Loading branch information
adamlui committed Nov 23, 2024
1 parent d9cff57 commit 89794e1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions chatgpt-auto-talk/greasemonkey/chatgpt-auto-talk.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
// @description:zu Dlala izimpendulo ze-ChatGPT ngokuzenzakalela
// @author Adam Lui
// @namespace https://github.com/adamlui
// @version 2024.11.22.11
// @version 2024.11.22.12
// @license MIT
// @icon https://assets.chatgptautotalk.com/images/icons/openai/black/icon48.png?v=9f1ed3c
// @icon64 https://assets.chatgptautotalk.com/images/icons/openai/black/icon64.png?v=9f1ed3c
Expand Down Expand Up @@ -383,13 +383,10 @@
const settingIsEnabled = config[key] ^ /disabled|hidden/i.test(key)
const menuLabel = `${ settings.controls[key].symbol || menu.state.symbols[+settingIsEnabled] } `
+ settings.controls[key].label + menu.state.separator + menu.state.words[+settingIsEnabled]
const registerOptions = ( // add menu tooltip in TM 5.0+
env.scriptManager.name == 'Tampermonkey' && parseInt(env.scriptManager.version.split('.')[0]) >= 5 ?
{ title: settings.controls[key].helptip } : undefined )
menu.ids.push(GM_registerMenuCommand(menuLabel, () => {
settings.save(key, !config[key]) ; syncConfigToUI()
notify(`${settings.controls[key].label}: ${menu.state.words[+(config[key] ^ /disabled|hidden/i.test(key))]}`)
}, registerOptions))
}))
})

// Add About entry
Expand Down

0 comments on commit 89794e1

Please sign in to comment.