Skip to content

Commit ead1b9f

Browse files
committed
Utilized app.urls.resourceHost in baseURL init in toggles.sidebar.update.navicon() ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/chatgpt-auto-refresh]
1 parent e4f339b commit ead1b9f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

chatgpt/chatgpt-auto-refresh/chatgpt-auto-refresh.user.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -853,9 +853,9 @@
853853
update: {
854854

855855
navicon({ preload } = {}) {
856-
const baseURL = 'https://cdn.jsdelivr.net/gh/adamlui/chatgpt-auto-refresh@579fa7c/assets/images/icons/auto-refresh',
857-
schemeMap = { light: 'black', dark: 'white' },
858-
fileName = 'icon32.png'
856+
const baseURL = `${
857+
app.urls.resourceHost.replace(/@\w+/, '@579fa7c')}/assets/images/icons/auto-refresh`
858+
const schemeMap = { light: 'black', dark: 'white' }, fileName = 'icon32.png'
859859
if (preload)
860860
Object.keys(schemeMap).forEach(scheme =>
861861
new Image().src = `${baseURL}/${schemeMap[scheme]}/${fileName}`)

0 commit comments

Comments
 (0)