Skip to content

Commit

Permalink
Corrected app.json path ↞ [auto-sync from https://github.com/adamlui/…
Browse files Browse the repository at this point in the history
  • Loading branch information
kudo-sync-bot committed Jan 17, 2025
1 parent 5f37c81 commit ae60ba6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion chrome/extension/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ chrome.runtime.onMessage.addListener(async req => {
chatgptJSver: /v(\d+\.\d+\.\d+)/.exec(await (await fetch(chrome.runtime.getURL('lib/chatgpt.js'))).text())[1]
}
app.urls.resourceHost = `https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@${app.latestResourceCommitHash}`
const remoteAppData = await (await fetch(`${app.urls.resourceHost}/data/assets/data/app.json`)).json()
const remoteAppData = await (await fetch(`${app.urls.resourceHost}/assets/data/app.json`)).json()
Object.assign(app, { ...remoteAppData, urls: { ...app.urls, ...remoteAppData.urls }})
chrome.storage.sync.set({ app }) // save to browser storage

Expand Down
2 changes: 1 addition & 1 deletion firefox/extension/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ chrome.runtime.onMessage.addListener(async req => {
chatgptJSver: /v(\d+\.\d+\.\d+)/.exec(await (await fetch(chrome.runtime.getURL('lib/chatgpt.js'))).text())[1]
}
app.urls.resourceHost = `https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@${app.latestResourceCommitHash}`
const remoteAppData = await (await fetch(`${app.urls.resourceHost}/data/assets/data/app.json`)).json()
const remoteAppData = await (await fetch(`${app.urls.resourceHost}/assets/data/app.json`)).json()
Object.assign(app, { ...remoteAppData, urls: { ...app.urls, ...remoteAppData.urls }})
chrome.storage.sync.set({ app }) // save to browser storage

Expand Down
4 changes: 2 additions & 2 deletions greasemonkey/chatgpt-widescreen-mode.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
// @description:zu Thuthukisa iChatGPT ngemodi zesikrini ezibanzi/egcwele/ephezulu + imodi yokuvimbela i-spam. Futhi isebenza ku-perplexity.ai + poe.com!
// @author Adam Lui
// @namespace https://github.com/adamlui
// @version 2025.1.16
// @version 2025.1.16.1
// @license MIT
// @icon https://assets.chatgptwidescreen.com/images/icons/widescreen-robot-emoji/icon48.png?v=844b16e
// @icon64 https://assets.chatgptwidescreen.com/images/icons/widescreen-robot-emoji/icon64.png?v=844b16e
Expand Down Expand Up @@ -307,7 +307,7 @@
}
app.urls.resourceHost = `https://cdn.jsdelivr.net/gh/adamlui/chatgpt-widescreen@${app.latestResourceCommitHash}`
const remoteAppData = await new Promise(resolve => xhr({
method: 'GET', url: `${app.urls.resourceHost}/data/assets/data/app.json`,
method: 'GET', url: `${app.urls.resourceHost}/assets/data/app.json`,
onload: resp => resolve(JSON.parse(resp.responseText))
}))
Object.assign(app, { ...remoteAppData, urls: { ...app.urls, ...remoteAppData.urls }})
Expand Down

0 comments on commit ae60ba6

Please sign in to comment.