Skip to content

Commit

Permalink
Limited button click animations to About/Settings/Speak buttons ↞ [au…
Browse files Browse the repository at this point in the history
…to-sync from `adamlui/chatgpt-apps`]
  • Loading branch information
adamlui authored and kudo-sync-bot committed Sep 21, 2024
1 parent 961f045 commit dcba251
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions greasemonkey/bravegpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.21.2
// @version 2024.9.21.3
// @license MIT
// @icon https://media.bravegpt.com/images/icons/bravegpt/icon48.png?0a9e287
// @icon64 https://media.bravegpt.com/images/icons/bravegpt/icon64.png?0a9e287
Expand Down Expand Up @@ -2344,10 +2344,9 @@
else if (btn.id == 'arrows-btn') btn.onclick = () => toggle.expandedMode()
if (!env.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 except to WSB/pin btns
if (/about|settings|speak/.test(btn.id)) btn.onmouseup = () => { // add zoom/fade-out to select buttons
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' // animate except when dismissing Font Size slider
btn.style.animation = 'btn-zoom-fade-out .220s ease-out'
setTimeout(() => { // hide btn after animation nears completion
Object.assign(btn.style, { opacity: '0', visibility: 'hidden', animation: '' })
setTimeout(() => // show btn after short delay
Expand Down

0 comments on commit dcba251

Please sign in to comment.