Skip to content

Commit

Permalink
Bumped app.latestResourceCommitHash, updated remote JSON paths
Browse files Browse the repository at this point in the history
  • Loading branch information
adamlui committed Jan 16, 2025
1 parent 4195530 commit 0c6f5e4
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.12.1
// @version 2025.1.16
// @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
Expand Down Expand Up @@ -284,11 +284,11 @@
const app = {
version: GM_info.script.version, configKeyPrefix: 'autoclearChatGPThistory',
chatgptJSver: /chatgpt\.js@([\d.]+)/.exec(GM_info.scriptMetaStr)[1], urls: {},
latestResourceCommitHash: '8ba1c01' // for cached app.json + messages.json + navicon in toggles.sidebar.insert()
latestResourceCommitHash: '06d6690' // for cached app.json + messages.json + navicon in toggles.sidebar.insert()
}
app.urls.resourceHost = `https://cdn.jsdelivr.net/gh/adamlui/autoclear-chatgpt-history@${app.latestResourceCommitHash}`
const remoteAppData = await new Promise(resolve => xhr({
method: 'GET', url: `${app.urls.resourceHost}/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
4 changes: 2 additions & 2 deletions chatgpt-auto-continue/chromium/extension/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ chrome.runtime.onMessage.addListener(async req => {
(async () => {
const app = {
version: chrome.runtime.getManifest().version,
latestResourceCommitHash: 'e41e388', // for cached app.json + icons.questionMark.src
latestResourceCommitHash: 'b81310f', // for cached app.json + icons.questionMark.src
urls: {},
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-auto-continue@${app.latestResourceCommitHash}`
const remoteAppData = await (await fetch(`${app.urls.resourceHost}/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
})()
4 changes: 2 additions & 2 deletions chatgpt-auto-continue/firefox/extension/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ chrome.runtime.onMessage.addListener(async req => {
(async () => {
const app = {
version: chrome.runtime.getManifest().version,
latestResourceCommitHash: 'e41e388', // for cached app.json + icons.questionMark.src
latestResourceCommitHash: 'b81310f', // for cached app.json + icons.questionMark.src
urls: {},
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-auto-continue@${app.latestResourceCommitHash}`
const remoteAppData = await (await fetch(`${app.urls.resourceHost}/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
})()
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
// @description:zu ⚡ Terus menghasilkan imibuzo eminingi ye-ChatGPT ngokwesizulu
// @author Adam Lui
// @namespace https://github.com/adamlui
// @version 2025.1.12.1
// @version 2025.1.16
// @license MIT
// @icon https://assets.chatgptautocontinue.com/images/icons/continue-symbol/circled/with-robot/icon48.png?v=8b39fb4
// @icon64 https://assets.chatgptautocontinue.com/images/icons/continue-symbol/circled/with-robot/icon64.png?v=8b39fb4
Expand Down Expand Up @@ -274,11 +274,11 @@
const app = {
version: GM_info.script.version, configKeyPrefix: 'chatGPTautoContinue',
chatgptJSver: /chatgpt\.js@([\d.]+)/.exec(GM_info.scriptMetaStr)[1], urls: {},
latestResourceCommitHash: 'e41e388' // for cached app.json + messages.json
latestResourceCommitHash: 'b81310f' // for cached app.json + messages.json
}
app.urls.resourceHost = `https://cdn.jsdelivr.net/gh/adamlui/chatgpt-auto-continue@${app.latestResourceCommitHash}`
const remoteAppData = await new Promise(resolve => xhr({
method: 'GET', url: `${app.urls.resourceHost}/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
4 changes: 2 additions & 2 deletions chatgpt-infinity/chrome/extension/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ chrome.runtime.onMessage.addListener(async req => {
(async () => {
const app = {
version: chrome.runtime.getManifest().version,
latestResourceCommitHash: '53e7511', // for cached app.json...
latestResourceCommitHash: '64cabb3', // for cached app.json...
// ... + navicon in toggles.sidebar.insert() + icons.questionMark.src
urls: {},
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-infinity@${app.latestResourceCommitHash}`
const remoteAppData = await (await fetch(`${app.urls.resourceHost}/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
})()
4 changes: 2 additions & 2 deletions chatgpt-infinity/firefox/extension/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ chrome.runtime.onMessage.addListener(async req => {
(async () => {
const app = {
version: chrome.runtime.getManifest().version,
latestResourceCommitHash: '53e7511', // for cached app.json...
latestResourceCommitHash: '64cabb3', // for cached app.json...
// ... + navicon in toggles.sidebar.insert() + icons.questionMark.src
urls: {},
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-infinity@${app.latestResourceCommitHash}`
const remoteAppData = await (await fetch(`${app.urls.resourceHost}/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
})()
6 changes: 3 additions & 3 deletions chatgpt-infinity/greasemonkey/chatgpt-infinity.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
// @description:zh-TW 從無所不知的 ChatGPT 生成無窮無盡的答案 (用任何語言!)
// @author Adam Lui
// @namespace https://github.com/adamlui
// @version 2025.1.12.1
// @version 2025.1.16
// @license MIT
// @icon https://assets.chatgptinfinity.com/images/icons/infinity-symbol/circled/with-robot/icon48.png?v=69e434b
// @icon64 https://assets.chatgptinfinity.com/images/icons/infinity-symbol/circled/with-robot/icon64.png?v=69e434b
Expand Down Expand Up @@ -267,11 +267,11 @@
const app = {
version: GM_info.script.version, configKeyPrefix: 'chatGPTinfinity',
chatgptJSver: /chatgpt\.js@([\d.]+)/.exec(GM_info.scriptMetaStr)[1], urls: {},
latestResourceCommitHash: '53e7511' // for cached app.json + messages.json + navicon in toggles.sidebar.insert()
latestResourceCommitHash: '64cabb3' // for cached app.json + messages.json + navicon in toggles.sidebar.insert()
}
app.urls.resourceHost = `https://cdn.jsdelivr.net/gh/adamlui/chatgpt-infinity@${app.latestResourceCommitHash}`
const remoteAppData = await new Promise(resolve => xhr({
method: 'GET', url: `${app.urls.resourceHost}/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
6 changes: 3 additions & 3 deletions chatgpt-widescreen/chrome/extension/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ chrome.runtime.onMessage.addListener(async req => {
// Init APP data
const app = {
version: chrome.runtime.getManifest().version,
latestResourceCommitHash: 'ad86f2f', // for cached app.json + sites.json + icons.questionMark.src
latestResourceCommitHash: '7a20e13', // for cached app.json + sites.json + icons.questionMark.src
urls: {},
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/app.json`)).json()
const remoteAppData = await (await fetch(`${app.urls.resourceHost}/data/assets/data/app.json`)).json()
Object.assign(app, { ...remoteAppData, urls: { ...app.urls, ...remoteAppData.urls }})
chrome.storage.sync.set({ app }) // save to browser storage

// Init SITES data
const sites = Object.assign(Object.create(null),
await (await fetch(`${app.urls.resourceHost}/data/sites.json`)).json())
await (await fetch(`${app.urls.resourceHost}/assets/data/sites.json`)).json())
chrome.storage.sync.set({ sites })

})()
6 changes: 3 additions & 3 deletions chatgpt-widescreen/firefox/extension/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ chrome.runtime.onMessage.addListener(async req => {
// Init APP data
const app = {
version: chrome.runtime.getManifest().version,
latestResourceCommitHash: 'ad86f2f', // for cached app.json + sites.json + icons.questionMark.src
latestResourceCommitHash: '7a20e13', // for cached app.json + sites.json + icons.questionMark.src
urls: {},
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/app.json`)).json()
const remoteAppData = await (await fetch(`${app.urls.resourceHost}/data/assets/data/app.json`)).json()
Object.assign(app, { ...remoteAppData, urls: { ...app.urls, ...remoteAppData.urls }})
chrome.storage.sync.set({ app }) // save to browser storage

// Init SITES data
const sites = Object.assign(Object.create(null),
await (await fetch(`${app.urls.resourceHost}/data/sites.json`)).json())
await (await fetch(`${app.urls.resourceHost}/assets/data/sites.json`)).json())
chrome.storage.sync.set({ sites })

})()
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.12.1
// @version 2025.1.16
// @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 @@ -303,11 +303,11 @@
const app = {
version: GM_info.script.version, configKeyPrefix: `${env.site} Widescreen`,
chatgptJSver: /chatgpt\.js@([\d.]+)/.exec(GM_info.scriptMetaStr)[1], urls: {},
latestResourceCommitHash: 'ad86f2f' // for cached app.json + sites.json + messages.json
latestResourceCommitHash: '7a20e13' // for cached app.json + sites.json + messages.json
}
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/app.json`,
method: 'GET', url: `${app.urls.resourceHost}/data/assets/data/app.json`,
onload: resp => resolve(JSON.parse(resp.responseText))
}))
Object.assign(app, { ...remoteAppData, urls: { ...app.urls, ...remoteAppData.urls }})
Expand Down Expand Up @@ -412,7 +412,7 @@

// Init SITE profiles
const sites = Object.assign(Object.create(null), await new Promise(resolve => xhr({
method: 'GET', url: `${app.urls.resourceHost}/data/sites.json`,
method: 'GET', url: `${app.urls.resourceHost}/assets/data/sites.json`,
onload: resp => resolve(JSON.parse(resp.responseText))
})))
sites.openai = { ...sites.chatgpt } // shallow copy to cover old domain
Expand Down

0 comments on commit 0c6f5e4

Please sign in to comment.