|
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.3 |
| 228 | +// @version 2025.1.29.4 |
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
|
|
797 | 797 | }
|
798 | 798 |
|
799 | 799 | // Update color/state
|
800 |
| - this.updateAesthetic() ; this.updateState() // to opposite init state for animation on 1st load |
| 800 | + this.updateScheme() ; this.updateState() // to opposite init state for animation on 1st load |
801 | 801 |
|
802 | 802 | // Add hover/click listeners
|
803 | 803 | this.div.onmouseover = this.div.onmouseout = event => // trigger OpenAI hover overlay
|
|
875 | 875 | sidebar.insertBefore(this.div, sidebar.children[1]) ; this.status = 'inserted'
|
876 | 876 | },
|
877 | 877 |
|
878 |
| - updateAesthetic() { // to match UI scheme |
879 |
| - const isDarkScheme = env.ui.scheme == 'dark' |
880 |
| - this.div.classList.add(isDarkScheme ? 'dark' : 'light') |
881 |
| - this.div.classList.remove(isDarkScheme ? 'light' : 'dark') |
| 878 | + updateScheme() { // to match UI scheme |
| 879 | + this.div.classList.add(env.ui.scheme) |
| 880 | + this.div.classList.remove(env.ui.scheme == 'dark' ? 'light' : 'dark') |
882 | 881 | this.navicon.src = `${app.urls.assetHost}/images/icons/incognito/${
|
883 | 882 | env.ui.scheme == 'dark' ? 'white' : 'black' }/icon32.png?v=${app.latestResourceCommitHash}`
|
884 | 883 | },
|
|
952 | 951 | function handleSchemePrefChange() {
|
953 | 952 | const displayedScheme = getScheme()
|
954 | 953 | if (env.ui.scheme != displayedScheme) {
|
955 |
| - env.ui.scheme = displayedScheme ; toggles.sidebar.updateAesthetic() ; modals.stylize() } |
| 954 | + env.ui.scheme = displayedScheme ; toggles.sidebar.updateScheme() ; modals.stylize() } |
956 | 955 | }
|
957 | 956 |
|
958 | 957 | // Disable distracting SIDEBAR CLICK-ZOOM effect
|
|
0 commit comments