From f7681a2a6e34a222196b9a90c385d2f9a98f2132 Mon Sep 17 00:00:00 2001 From: kudo-sync-bot Date: Wed, 29 Jan 2025 22:52:06 -0800 Subject: [PATCH] =?UTF-8?q?Abstrcted=20`toggles.sidebar.updateNavicon()`?= =?UTF-8?q?=20=E2=86=9E=20[auto-sync=20from=20https://github.com/adamlui/a?= =?UTF-8?q?i-web-extensions/tree/main/autoclear-chatgpt-history]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- greasemonkey/autoclear-chatgpt-history.user.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/greasemonkey/autoclear-chatgpt-history.user.js b/greasemonkey/autoclear-chatgpt-history.user.js index 8a16798..52252b2 100644 --- a/greasemonkey/autoclear-chatgpt-history.user.js +++ b/greasemonkey/autoclear-chatgpt-history.user.js @@ -225,7 +225,7 @@ // @description:zu Ziba itshala lokucabanga okuzoshintshwa ngokuzenzakalelayo uma ukubuka chatgpt.com // @author Adam Lui // @namespace https://github.com/adamlui -// @version 2025.1.29.5 +// @version 2025.1.29.6 // @license MIT // @icon https://assets.autoclearchatgpt.com/images/icons/openai/black/icon48.png?v=f461c06 // @icon64 https://assets.autoclearchatgpt.com/images/icons/openai/black/icon64.png?v=f461c06 @@ -875,11 +875,15 @@ sidebar.insertBefore(this.div, sidebar.children[1]) ; this.status = 'inserted' }, + updateNavicon() { + this.navicon.src = `${app.urls.assetHost}/images/icons/incognito/${ + env.ui.scheme == 'dark' ? 'white' : 'black' }/icon32.png?v=${app.latestResourceCommitHash}` + }, + updateScheme() { // to match UI scheme this.div.classList.add(env.ui.scheme) this.div.classList.remove(env.ui.scheme == 'dark' ? 'light' : 'dark') - this.navicon.src = `${app.urls.assetHost}/images/icons/incognito/${ - env.ui.scheme == 'dark' ? 'white' : 'black' }/icon32.png?v=${app.latestResourceCommitHash}` + this.updateNavicon() }, updateState() {