From 27e62bc0033a65fde3077a9f4f0c31661caacf76 Mon Sep 17 00:00:00 2001 From: kudo-sync-bot Date: Fri, 22 Nov 2024 18:42:28 -0800 Subject: [PATCH] =?UTF-8?q?Moved=20`xhr`=20init=20to=20top=20for=20improve?= =?UTF-8?q?d=20structure=20=E2=86=9E=20[auto-sync=20from=20https://github.?= =?UTF-8?q?com/adamlui/ai-web-extensions]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- greasemonkey/duckduckgpt.user.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/greasemonkey/duckduckgpt.user.js b/greasemonkey/duckduckgpt.user.js index 9cf0724512e..badb9a6f6d2 100644 --- a/greasemonkey/duckduckgpt.user.js +++ b/greasemonkey/duckduckgpt.user.js @@ -148,7 +148,7 @@ // @description:zu Yengeza izimpendulo ze-AI ku-DuckDuckGo (inikwa amandla yi-GPT-4o!) // @author KudoAI // @namespace https://kudoai.com -// @version 2024.11.22.3 +// @version 2024.11.22.4 // @license MIT // @icon https://media.ddgpt.com/images/icons/duckduckgpt/icon48.png?af89302 // @icon64 https://media.ddgpt.com/images/icons/duckduckgpt/icon64.png?af89302 @@ -231,6 +231,7 @@ ['Chrome', 'Firefox', 'Edge', 'Brave', 'Mobile'].forEach(platform => env.browser[`is${ platform == 'Firefox' ? 'FF' : platform }`] = chatgpt.browser['is' + platform]()) env.browser.isPortrait = env.browser.isMobile && (window.innerWidth < window.innerHeight) + const xhr = env.scriptManager.name == 'OrangeMonkey' ? GM_xmlhttpRequest : GM.xmlHttpRequest // Init APP data const app = { @@ -402,7 +403,6 @@ // Init app MESSAGES log.debug('Initializing app messages...') - const xhr = env.scriptManager.name == 'OrangeMonkey' ? GM_xmlhttpRequest : GM.xmlHttpRequest app.msgs = { appDesc: 'Adds ChatGPT answers to DuckDuckGo sidebar (powered by GPT-4o!)', menuLabel_proxyAPImode: 'Proxy API Mode',