From e14f8424a60fde90bbc86d1c853fd5bfae0bd6a8 Mon Sep 17 00:00:00 2001 From: kudo-sync-bot Date: Fri, 29 Nov 2024 02:12:10 -0800 Subject: [PATCH] =?UTF-8?q?Moved=20`extensionInstalled`=20to=20`env.extens?= =?UTF-8?q?ionInstalled`=20for=20improved=20structure=20=E2=86=9E=20[auto-?= =?UTF-8?q?sync=20from=20https://github.com/adamlui/ai-web-extensions]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- greasemonkey/chatgpt-infinity.user.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/greasemonkey/chatgpt-infinity.user.js b/greasemonkey/chatgpt-infinity.user.js index c9f7371f..503b7c3e 100644 --- a/greasemonkey/chatgpt-infinity.user.js +++ b/greasemonkey/chatgpt-infinity.user.js @@ -199,7 +199,7 @@ // @description:zh-TW 從無所不知的 ChatGPT 生成無窮無盡的答案 (用任何語言!) // @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/* @@ -883,14 +883,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('cif-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