Skip to content

Commit

Permalink
Restored checkForUpdates() name to updateCheck() to avoid endless…
Browse files Browse the repository at this point in the history
… recursion for sharing name w/ `modals.update.available()` btn callback func ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions]
  • Loading branch information
kudo-sync-bot committed Dec 6, 2024
1 parent 538c68d commit a46b0df
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions chrome/extension/components/modals.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ window.modals = {

dependencies: {
import(dependencies) {
// { app, browserLang: env.browser.language (userscript only), checkForUpdates (userscript only) }
// { app, browserLang: env.browser.language (userscript only), updateCheck (userscript only) }
for (const name in dependencies) this[name] = dependencies[name] }
},

Expand Down Expand Up @@ -106,7 +106,7 @@ window.modals = {
function moreAIextensions(){}
]
if (this.env.runtime.includes('Greasemonkey')) modalBtns.unshift(
function checkForUpdates(){ modals.dependencies.checkForUpdates() })
function checkForUpdates(){ modals.dependencies.updateCheck() })

// Show modal
const aboutModal = modals.alert(
Expand Down
4 changes: 2 additions & 2 deletions firefox/extension/components/modals.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ window.modals = {

dependencies: {
import(dependencies) {
// { app, browserLang: env.browser.language (userscript only), checkForUpdates (userscript only) }
// { app, browserLang: env.browser.language (userscript only), updateCheck (userscript only) }
for (const name in dependencies) this[name] = dependencies[name] }
},

Expand Down Expand Up @@ -106,7 +106,7 @@ window.modals = {
function moreAIextensions(){}
]
if (this.env.runtime.includes('Greasemonkey')) modalBtns.unshift(
function checkForUpdates(){ modals.dependencies.checkForUpdates() })
function checkForUpdates(){ modals.dependencies.updateCheck() })

// Show modal
const aboutModal = modals.alert(
Expand Down
6 changes: 3 additions & 3 deletions greasemonkey/chatgpt-widescreen-mode.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
// @description:zu Yengeza Isikrini Esibanzi + Izindlela Zesikrini Esigcwele ku-chatgpt.com + perplexity.ai + poe.com ukuze uthole ukubuka okuthuthukisiwe + okuncishisiwe ukuskrola
// @author Adam Lui
// @namespace https://github.com/adamlui
// @version 2024.12.5.6
// @version 2024.12.5.7
// @license MIT
// @icon https://media.chatgptwidescreen.com/images/icons/widescreen-robot-emoji/icon48.png?9a393be
// @icon64 https://media.chatgptwidescreen.com/images/icons/widescreen-robot-emoji/icon64.png?9a393be
Expand Down Expand Up @@ -394,7 +394,7 @@
sites.openai = { ...sites.chatgpt } // shallow copy to cover old domain

// Init MODALS dependencies
modals.dependencies.import({ app, browserLang: env.browser.language, siteAlert, checkForUpdates })
modals.dependencies.import({ app, browserLang: env.browser.language, siteAlert, updateCheck })

// Init SETTINGS
settings.dependencies.import({ app }) // for app.msgs + app.configKeyPrefix refs
Expand Down Expand Up @@ -451,7 +451,7 @@
}
}

function checkForUpdates() {
function updateCheck() {
xhr({
method: 'GET', url: app.urls.update + '?t=' + Date.now(),
headers: { 'Cache-Control': 'no-cache' },
Expand Down

0 comments on commit a46b0df

Please sign in to comment.