|
220 | 220 | // @description:zu *NGOKUPHEPHA* susa ukusetha kabusha ingxoxo yemizuzu eyi-10 + amaphutha enethiwekhi ahlala njalo + Ukuhlolwa kwe-Cloudflare ku-ChatGPT. |
221 | 221 | // @author Adam Lui |
222 | 222 | // @namespace https://github.com/adamlui |
223 | | -// @version 2025.2.25.2 |
| 223 | +// @version 2025.2.26 |
224 | 224 | // @license MIT |
225 | 225 | // @icon https://assets.chatgptautorefresh.com/images/icons/openai/black/icon48.png?v=f11a0a8 |
226 | 226 | // @icon64 https://assets.chatgptautorefresh.com/images/icons/openai/black/icon64.png?v=f11a0a8 |
|
401 | 401 | label: app.msgs.menuLabel_refreshInt, helptip: app.msgs.helptip_refreshInt } |
402 | 402 | }, |
403 | 403 |
|
| 404 | + isEnabled(key) { return config[key] ^ /disabled/i.test(key) }, |
| 405 | + |
404 | 406 | load(...keys) { |
405 | 407 | keys.flat().forEach(key => { |
406 | 408 | config[key] = GM_getValue(`${app.configKeyPrefix}_${key}`, |
|
435 | 437 | Object.keys(settings.controls).forEach(key => { |
436 | 438 | const ctrlType = settings.controls[key].type |
437 | 439 | const ctrlStatus = settings.controls[key].status |
438 | | - const menuLabel = `${ settings.controls[key].symbol || this.state.symbols[+settingIsEnabled(key)] } ` |
| 440 | + const menuLabel = `${ settings.controls[key].symbol || this.state.symbols[+settings.isEnabled(key)] } ` |
439 | 441 | + settings.controls[key].label |
440 | 442 | + ( ctrlType == 'toggle' ? this.state.separator |
441 | | - + this.state.words[+settingIsEnabled(key)] |
| 443 | + + this.state.words[+settings.isEnabled(key)] |
442 | 444 | : ctrlStatus ? `— ${settings.controls[key].status}` : '' ) |
443 | 445 | this.ids.push(GM_registerMenuCommand(menuLabel, () => { |
444 | 446 | if (ctrlType == 'toggle') { |
|
474 | 476 | + ` ${app.msgs[`menuLabel_${entryType}`]} ${ entryType == 'about' ? app.msgs.appName : '' }`, |
475 | 477 | () => modals.open(entryType), env.scriptManager.supportsTooltips ? { title: ' ' } : undefined |
476 | 478 | ))) |
477 | | - |
478 | | - function settingIsEnabled(key) { return config[key] ^ /disabled/i.test(key) } |
479 | 479 | } |
480 | 480 | } |
481 | 481 |
|
|
0 commit comments