|
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.4.20 |
| 223 | +// @version 2025.4.24 |
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
|
|
436 | 436 |
|
437 | 437 | // Add toggles
|
438 | 438 | this.entryIDs = Object.keys(settings.controls).map(key => {
|
439 |
| - const ctrlType = settings.controls[key].type |
440 |
| - const ctrlStatus = settings.controls[key].status |
| 439 | + const ctrl = settings.controls[key] |
441 | 440 | const menuLabel = `${
|
442 |
| - settings.controls[key].symbol || this.state.symbols[+settings.typeIsEnabled(key)] } ${ |
443 |
| - settings.controls[key].label} ${ |
444 |
| - ctrlType == 'toggle' ? this.state.separator + this.state.words[+settings.typeIsEnabled(key)] |
445 |
| - : ctrlStatus ? `— ${ctrlStatus}` : '' }` |
| 441 | + ctrl.symbol || this.state.symbols[+settings.typeIsEnabled(key)] } ${ctrl.label} ${ |
| 442 | + ctrl.type == 'toggle' ? this.state.separator + this.state.words[+settings.typeIsEnabled(key)] |
| 443 | + : ctrl.status ? `— ${ctrl.status}` : '' }` |
446 | 444 | return GM_registerMenuCommand(menuLabel, () => {
|
447 |
| - if (ctrlType == 'toggle') { |
| 445 | + if (ctrl.type == 'toggle') { |
448 | 446 | settings.save(key, !config[key])
|
449 |
| - notify(`${settings.controls[key].label}: ${this.state.words[+settings.typeIsEnabled(key)]}`) |
| 447 | + notify(`${ctrl.label}: ${this.state.words[+settings.typeIsEnabled(key)]}`) |
450 | 448 | } else { // Refresh Interval prompt
|
451 | 449 | while (true) {
|
452 | 450 | const refreshInterval = prompt(
|
|
467 | 465 | }}
|
468 | 466 | }
|
469 | 467 | syncConfigToUI({ updatedKey: key })
|
470 |
| - }, env.scriptManager.supportsTooltips ? { title: settings.controls[key].helptip || ' ' } : undefined) |
| 468 | + }, env.scriptManager.supportsTooltips ? { title: ctrl.helptip || ' ' } : undefined) |
471 | 469 | });
|
472 | 470 |
|
473 | 471 | // Add About/Donate entries
|
|
0 commit comments