diff --git a/chatgpt/autoclear-chatgpt-history/autoclear-chatgpt-history.user.js b/chatgpt/autoclear-chatgpt-history/autoclear-chatgpt-history.user.js index 62f59794f1..2f85a9d12a 100644 --- a/chatgpt/autoclear-chatgpt-history/autoclear-chatgpt-history.user.js +++ b/chatgpt/autoclear-chatgpt-history/autoclear-chatgpt-history.user.js @@ -225,7 +225,7 @@ // @description:zu Ziba itshala lokucabanga okuzoshintshwa ngokuzenzakalelayo uma ukubuka chatgpt.com // @author Adam Lui // @namespace https://github.com/adamlui -// @version 2024.12.23.5 +// @version 2024.12.25 // @license MIT // @icon https://media.autoclearchatgpt.com/images/icons/openai/black/icon48.png?a8868ef // @icon64 https://media.autoclearchatgpt.com/images/icons/openai/black/icon64.png?a8868ef @@ -276,6 +276,8 @@ ui: { scheme: getScheme() } } env.browser.isPortrait = env.browser.isMobile && (window.innerWidth < window.innerHeight) + 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 @@ -398,8 +400,7 @@ }, register() { - const tooltipsSupported = env.scriptManager.name == 'Tampermonkey' - && parseInt(env.scriptManager.version.split('.')[0]) >= 5 + // Add toggles Object.keys(settings.controls).forEach(key => { const settingIsEnabled = config[key] ^ /disabled|hidden/i.test(key) @@ -414,14 +415,14 @@ menu.state.words[+(config[key] ^ /disabled|hidden/i.test(key))]}`) } else // Clear Now action clearChatsAndGoHome() - }, tooltipsSupported ? { title: settings.controls[key].helptip || ' ' } : undefined)) + }, env.scriptManager.supportsTooltips ? { title: settings.controls[key].helptip || ' ' } : undefined)) }); // Add About/Donate entries ['about', 'donate'].forEach(entryType => menu.ids.push(GM_registerMenuCommand( `${ entryType == 'about' ? '💡' : '💖' }` + ` ${app.msgs[`menuLabel_${entryType}`]} ${ entryType == 'about' ? app.msgs.appName : '' }`, - () => modals.open(entryType), tooltipsSupported ? { title: ' ' } : undefined + () => modals.open(entryType), env.scriptManager.supportsTooltips ? { title: ' ' } : undefined ))) },