From 6bde0e49ef7019bf84601db4f7e68a4c29c8f8a7 Mon Sep 17 00:00:00 2001 From: "adamlui@protonmail.com" Date: Wed, 11 Sep 2024 11:32:37 +0000 Subject: [PATCH] =?UTF-8?q?Disabled=20button=20animations=20when=20FG=20An?= =?UTF-8?q?imations=20setting=20disabled=20=E2=86=9E=20[auto-sync=20from?= =?UTF-8?q?=20`adamlui/chatgpt-apps`]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- greasemonkey/bravegpt.user.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/greasemonkey/bravegpt.user.js b/greasemonkey/bravegpt.user.js index 03604407..eb89e964 100644 --- a/greasemonkey/bravegpt.user.js +++ b/greasemonkey/bravegpt.user.js @@ -148,7 +148,7 @@ // @description:zu Yengeza izimpendulo ze-AI ku-Brave Search (inikwa amandla yi-GPT-4o!) // @author KudoAI // @namespace https://kudoai.com -// @version 2024.9.11.3 +// @version 2024.9.11.4 // @license MIT // @icon https://media.bravegpt.com/images/icons/bravegpt/icon48.png?0a9e287 // @icon64 https://media.bravegpt.com/images/icons/bravegpt/icon64.png?0a9e287 @@ -2250,9 +2250,10 @@ else if (btn.id == 'arrows-btn') btn.onclick = () => toggle.expandedMode() if (!browser.isMobile && btn.id != 'pin-btn') // add hover listeners for tooltips btn.onmouseover = btn.onmouseout = toggle.tooltip - if (!/wsb|pin/.test(btn.id)) btn.onmouseup = () => { // add zoom/fade-out + if (!/wsb|pin/.test(btn.id)) btn.onmouseup = () => { // add zoom/fade-out except to WSB/pin btns + if (config.fgAnimationsDisabled) return if (!(btn.id == 'font-size-btn' && appDiv.querySelector('#font-size-slider-track')?.classList.contains('active'))) - btn.style.animation = 'btn-zoom-fade-out .220s ease-out' + btn.style.animation = 'btn-zoom-fade-out .220s ease-out' // animate except when dismissing Font Size slider setTimeout(() => { // hide btn after animation nears completion Object.assign(btn.style, { opacity: '0', visibility: 'hidden', animation: '' }) setTimeout(() => // show btn after short delay @@ -3227,6 +3228,7 @@ if (!browser.isMobile) toggle.tooltip(event) // show copied status in tooltip } copySpan.onmouseup = () => { // zoom/fade-out + if (config.fgAnimationsDisabled) return const copySVG = copySpan.querySelector('#copy-icon') if (!copySVG) return // since clicking on copied icon copySpan.style.animation = `btn-zoom-fade-out .${fadeDuration}s ease-out`