Skip to content

Commit

Permalink
Condensed toggles.sidebar.update.navicon() ↞ [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 98b1a96 commit e0ee81d
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions chatgpt/chatgpt-auto-refresh/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.30.2
// @version 2025.1.30.3
// @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 @@ -914,15 +914,11 @@
navicon({ preload = false } = {}) {
const baseURL = `${app.urls.assetHost}/images/icons/auto-refresh`,
schemeMap = { light: 'black', dark: 'white' },
fileName = 'icon32.png'

fileName = `icon32.png?v=${app.latestResourceCommitHash}`
if (preload)
Object.keys(schemeMap).forEach(scheme =>
new Image().src = `${baseURL}/${schemeMap[scheme]}/${fileName}?v=`
+ app.latestResourceCommitHash
)
else toggles.sidebar.navicon.src = baseURL
+ `/${schemeMap[env.ui.scheme]}/${fileName}?v=${app.latestResourceCommitHash}`
new Image().src = `${baseURL}/${schemeMap[scheme]}/${fileName}`)
else toggles.sidebar.navicon.src = `${baseURL}/${schemeMap[env.ui.scheme]}/${fileName}`
},

scheme() { // to match UI scheme
Expand Down

0 comments on commit e0ee81d

Please sign in to comment.