Skip to content

Commit

Permalink
Moved extensionInstalled to env.extensionInstalled for improved s…
Browse files Browse the repository at this point in the history
…tructure ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions]
  • Loading branch information
kudo-sync-bot committed Nov 29, 2024
1 parent 843ca25 commit b751cce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions greasemonkey/chatgpt-auto-continue.user.js
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 2024.11.27.1
// @version 2024.11.29
// @license MIT
// @match *://chatgpt.com/*
// @match *://chat.openai.com/*
Expand Down Expand Up @@ -633,14 +633,14 @@
// Run MAIN routine

// Create browser TOOLBAR MENU or DISABLE SCRIPT if extension installed
const extensionInstalled = await Promise.race([
env.extensionInstalled = await Promise.race([
new Promise(resolve => {
(function checkExtensionInstalled() {
if (document.documentElement.hasAttribute('chatgpt-auto-continue-extension-installed')) resolve(true)
else setTimeout(checkExtensionInstalled, 200)
})()
}), new Promise(resolve => setTimeout(() => resolve(false), 1500))])
if (extensionInstalled) { // disable script/menu
if (env.extensionInstalled) { // disable script/menu
GM_registerMenuCommand(`${menu.state.symbols[0]} ${app.msgs.menuLabel_disabled}`, modals.about.show)
return // exit script
} else menu.register() // create functional menu
Expand Down

0 comments on commit b751cce

Please sign in to comment.