From a1811dd84d9298c498354dc420191a0176df8d3e Mon Sep 17 00:00:00 2001 From: kudo-sync-bot Date: Wed, 25 Dec 2024 02:21:42 -0800 Subject: [PATCH] =?UTF-8?q?Moved=20`tooltipsSupported`=20from=20`menu.regi?= =?UTF-8?q?ster()`=20to=20`env.scriptManager.supportsTooltips`=20for=20rea?= =?UTF-8?q?dability=20=E2=86=9E=20[auto-sync=20from=20https://github.com/a?= =?UTF-8?q?damlui/ai-web-extensions]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- chatgpt/duckduckgpt/duckduckgpt.user.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/chatgpt/duckduckgpt/duckduckgpt.user.js b/chatgpt/duckduckgpt/duckduckgpt.user.js index e53b80cfb..06050af3b 100644 --- a/chatgpt/duckduckgpt/duckduckgpt.user.js +++ b/chatgpt/duckduckgpt/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.12.24 +// @version 2024.12.25 // @license MIT // @icon https://media.ddgpt.com/images/icons/duckduckgpt/icon48.png?af89302 // @icon64 https://media.ddgpt.com/images/icons/duckduckgpt/icon64.png?af89302 @@ -232,6 +232,8 @@ env.browser[`is${ platform == 'Firefox' ? 'FF' : platform }`] = chatgpt.browser['is' + platform]()) env.browser.isPortrait = env.browser.isMobile && (window.innerWidth < window.innerHeight) env.userLocale = env.browser.language.includes('-') ? env.browser.language.split('-')[1].toLowerCase() : '' + env.scriptManager.supportsTooltips = env.scriptManager.name == 'Tampermonkey' + && parseInt(env.scriptManager.version.split('.')[0]) >= 5 const xhr = typeof GM != 'undefined' && GM.xmlHttpRequest || GM_xmlhttpRequest // Init APP data @@ -641,20 +643,18 @@ }, register() { - const tooltipsSupported = env.scriptManager.name == 'Tampermonkey' - && parseInt(env.scriptManager.version.split('.')[0]) >= 5 // Add Proxy API Mode toggle const pmLabel = menu.state.symbols[+config.proxyAPIenabled] + ' ' + settings.controls.proxyAPIenabled.label + ' ' + menu.state.separator + menu.state.words[+config.proxyAPIenabled] menu.ids.push(GM_registerMenuCommand(pmLabel, toggle.proxyMode, - tooltipsSupported ? { title: settings.controls.proxyAPIenabled.helptip } : undefined)); + env.scriptManager.supportsTooltips ? { title: settings.controls.proxyAPIenabled.helptip } : undefined)); // Add About/Settings entries ['about', 'settings'].forEach(entryType => menu.ids.push(GM_registerMenuCommand( entryType == 'about' ? `💡 ${settings.controls.about.label}` : `⚙️ ${app.msgs.menuLabel_settings}`, - () => modals.open(entryType), tooltipsSupported ? { title: ' ' } : undefined + () => modals.open(entryType), env.scriptManager.supportsTooltips ? { title: ' ' } : undefined ))) },