|
225 | 225 | // @description:zu Ziba itshala lokucabanga okuzoshintshwa ngokuzenzakalelayo uma ukubuka chatgpt.com
|
226 | 226 | // @author Adam Lui
|
227 | 227 | // @namespace https://github.com/adamlui
|
228 |
| -// @version 2025.1.29 |
| 228 | +// @version 2025.1.29.1 |
229 | 229 | // @license MIT
|
230 | 230 | // @icon https://assets.autoclearchatgpt.com/images/icons/openai/black/icon48.png?v=f461c06
|
231 | 231 | // @icon64 https://assets.autoclearchatgpt.com/images/icons/openai/black/icon64.png?v=f461c06
|
|
463 | 463 | // Define FEEDBACK functions
|
464 | 464 |
|
465 | 465 | function notify(msg, pos = '', notifDuration = '', shadow = '') {
|
466 |
| - if (config.notifDisabled && !msg.includes(app.msgs.menuLabel_modeNotifs)) return |
467 | 466 |
|
468 | 467 | // Strip state word to append colored one later
|
469 | 468 | const foundState = menu.state.words.find(word => msg.includes(word))
|
|
475 | 474 |
|
476 | 475 | // Append styled state word
|
477 | 476 | if (foundState) {
|
| 477 | + const stateStyles = { |
| 478 | + on: { |
| 479 | + light: 'color: #5cef48 ; text-shadow: rgba(255,250,169,0.38) 2px 1px 5px', |
| 480 | + dark: 'color: #5cef48 ; text-shadow: rgb(55, 255, 0) 3px 0 10px' |
| 481 | + }, |
| 482 | + off: { |
| 483 | + light: 'color: #ef4848 ; text-shadow: rgba(255,169,225,0.44) 2px 1px 5px', |
| 484 | + dark: 'color: #ef4848 ; text-shadow: rgba(255, 116, 116, 0.87) 3px 0 9px' |
| 485 | + } |
| 486 | + } |
478 | 487 | const styledStateSpan = document.createElement('span')
|
479 |
| - styledStateSpan.style.cssText = `color: ${ |
480 |
| - foundState == menu.state.words[0] ? '#ef4848 ; text-shadow: rgba(255,169,225,0.44) 2px 1px 5px' |
481 |
| - : '#5cef48 ; text-shadow: rgba(255,250,169,0.38) 2px 1px 5px' }` |
| 488 | + styledStateSpan.style.cssText = stateStyles[foundState == menu.state.words[0] ? 'off' : 'on'][env.ui.scheme] |
482 | 489 | styledStateSpan.append(foundState) ; notif.append(styledStateSpan)
|
483 | 490 | }
|
484 | 491 | }
|
|
0 commit comments