Skip to content

Commit

Permalink
Renamed latestAssetCommitHash to latestResourceCommitHash + `urls…
Browse files Browse the repository at this point in the history
….assetHost` to `urls.resourceHost` ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions]
  • Loading branch information
kudo-sync-bot committed Jan 6, 2025
1 parent 1e41408 commit 6b800df
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions greasemonkey/googlegpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
// @description:zu Yengeza izimpendulo ze-AI ku-Google Search (inikwa amandla yi-Google Gemma + GPT-4o!)
// @author KudoAI
// @namespace https://kudoai.com
// @version 2025.1.5
// @version 2025.1.5.1
// @license MIT
// @icon https://assets.googlegpt.io/images/icons/googlegpt/black/icon48.png?v=59409b2
// @icon64 https://assets.googlegpt.io/images/icons/googlegpt/black/icon64.png?v=59409b2
Expand Down Expand Up @@ -446,9 +446,9 @@
review: { greasyFork: 'https://greasyfork.org/scripts/478597-googlegpt/feedback#post-discussion' },
support: 'https://support.googlegpt.io'
},
latestAssetCommitHash: 'ff71c6d' // for cached messages.json
latestResourceCommitHash: 'ff71c6d' // for cached messages.json
}
app.urls.assetHost = app.urls.gitHub.replace('github.com', 'cdn.jsdelivr.net/gh') + `@${app.latestAssetCommitHash}`
app.urls.resourceHost = app.urls.gitHub.replace('github.com', 'cdn.jsdelivr.net/gh') + `@${app.latestResourceCommitHash}`
app.urls.update = app.urls.greasyFork.replace('https://', 'https://update.')
.replace(/(\d+)-?([a-z-]*)$/i, (_, id, name) => `${id}/${ name || 'script' }.meta.js`)
app.msgs = {
Expand Down Expand Up @@ -654,7 +654,7 @@
if (!env.browser.language.startsWith('en')) {
log.debug('Localizing app messages...')
const localizedMsgs = await new Promise(resolve => {
const msgHostDir = app.urls.assetHost + '/greasemonkey/_locales/',
const msgHostDir = app.urls.resourceHost + '/greasemonkey/_locales/',
msgLocaleDir = ( env.browser.language ? env.browser.language.replace('-', '_') : 'en' ) + '/'
let msgHref = msgHostDir + msgLocaleDir + 'messages.json', msgXHRtries = 0
function fetchMsgs() { xhr({ method: 'GET', url: msgHref, onload: handleMsgs })}
Expand Down

0 comments on commit 6b800df

Please sign in to comment.