Skip to content

Commit 4c9c925

Browse files
committed
Condensed toggles.sidebar.updateAesthetic(), renamed to updateScheme() ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/autoclear-chatgpt-history]
1 parent b3e103d commit 4c9c925

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

chatgpt/autoclear-chatgpt-history/autoclear-chatgpt-history.user.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@
225225
// @description:zu Ziba itshala lokucabanga okuzoshintshwa ngokuzenzakalelayo uma ukubuka chatgpt.com
226226
// @author Adam Lui
227227
// @namespace https://github.com/adamlui
228-
// @version 2025.1.29.3
228+
// @version 2025.1.29.4
229229
// @license MIT
230230
// @icon https://assets.autoclearchatgpt.com/images/icons/openai/black/icon48.png?v=f461c06
231231
// @icon64 https://assets.autoclearchatgpt.com/images/icons/openai/black/icon64.png?v=f461c06
@@ -797,7 +797,7 @@
797797
}
798798

799799
// 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
801801

802802
// Add hover/click listeners
803803
this.div.onmouseover = this.div.onmouseout = event => // trigger OpenAI hover overlay
@@ -875,10 +875,9 @@
875875
sidebar.insertBefore(this.div, sidebar.children[1]) ; this.status = 'inserted'
876876
},
877877

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')
882881
this.navicon.src = `${app.urls.assetHost}/images/icons/incognito/${
883882
env.ui.scheme == 'dark' ? 'white' : 'black' }/icon32.png?v=${app.latestResourceCommitHash}`
884883
},
@@ -952,7 +951,7 @@
952951
function handleSchemePrefChange() {
953952
const displayedScheme = getScheme()
954953
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() }
956955
}
957956

958957
// Disable distracting SIDEBAR CLICK-ZOOM effect

0 commit comments

Comments
 (0)