Skip to content

Commit

Permalink
Abstrcted toggles.sidebar.updateNavicon() ↞ [auto-sync from https:/…
Browse files Browse the repository at this point in the history
  • Loading branch information
kudo-sync-bot committed Jan 30, 2025
1 parent 1b15fa5 commit 091cec0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions greasemonkey/chatgpt-auto-refresh.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
// @description:zu *NGOKUPHEPHA* susa ukusetha kabusha ingxoxo yemizuzu eyi-10 + amaphutha enethiwekhi ahlala njalo + Ukuhlolwa kwe-Cloudflare ku-ChatGPT.
// @author Adam Lui
// @namespace https://github.com/adamlui
// @version 2025.1.29.6
// @version 2025.1.29.7
// @license MIT
// @icon https://assets.chatgptautorefresh.com/images/icons/openai/black/icon48.png?v=f11a0a8
// @icon64 https://assets.chatgptautorefresh.com/images/icons/openai/black/icon64.png?v=f11a0a8
Expand Down Expand Up @@ -909,11 +909,15 @@
sidebar.insertBefore(this.div, sidebar.children[1]) ; this.status = 'inserted'
},

updateNavicon() {
this.navicon.src = `${app.urls.assetHost}/images/icons/auto-refresh/${
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/auto-refresh/${
env.ui.scheme == 'dark' ? 'white' : 'black' }/icon32.png?v=${app.latestResourceCommitHash}`
this.updateNavicon()
},

updateState() {
Expand Down

0 comments on commit 091cec0

Please sign in to comment.