Skip to content

Commit 148efd2

Browse files
committed
Fixed reply corner button tooltips didn't update on click in FF
1 parent 5c3d7fa commit 148efd2

File tree

4 files changed

+40
-12
lines changed

4 files changed

+40
-12
lines changed

amazongpt/greasemonkey/amazongpt.user.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// @description Adds the magic of AI to Amazon shopping
44
// @author KudoAI
55
// @namespace https://kudoai.com
6-
// @version 2025.2.8.1
6+
// @version 2025.2.8.2
77
// @license MIT
88
// @icon https://amazongpt.kudoai.com/assets/images/icons/amazongpt/black-gold-teal/icon48.png?v=0fddfc7
99
// @icon64 https://amazongpt.kudoai.com/assets/images/icons/amazongpt/black-gold-teal/icon64.png?v=0fddfc7
@@ -2817,8 +2817,11 @@
28172817
const textToCopy = textContainer.textContent.replace(/^>> /, '').trim()
28182818
copyBtn.style.cursor = 'default' // remove finger
28192819
copyBtn.replaceChild(copySVGs.copied, copySVGs.copy) // change to Copied icon
2820-
setTimeout(() => { // restore icon/cursor after a bit
2821-
copyBtn.style.cursor = 'pointer' ; copyBtn.replaceChild(copySVGs.copy, copySVGs.copied) }, 1355)
2820+
copyBtn.dispatchEvent(new Event('mouseenter')) // update tooltip
2821+
setTimeout(() => { // restore icon/cursor/tooltip after a bit
2822+
copyBtn.replaceChild(copySVGs.copy, copySVGs.copied)
2823+
copyBtn.style.cursor = 'pointer' ; copyBtn.dispatchEvent(new Event('mouseenter'))
2824+
}, 1355)
28222825
navigator.clipboard.writeText(textToCopy) // copy text to clipboard
28232826
}
28242827

@@ -2887,6 +2890,8 @@
28872890
'linear-gradient(to right, transparent, black 20%, black 81%, transparent)' )
28882891
}
28892892

2893+
speakBtn.dispatchEvent(new Event('mouseenter')) // update tooltip
2894+
28902895
// Play reply
28912896
const wholeAnswer = appDiv.querySelector('pre').textContent
28922897
const cjsSpeakConfig = { voice: 2, pitch: 1, speed: 1.5, onend: handleAudioEnded }
@@ -2927,6 +2932,7 @@
29272932
+ encodeURIComponent(securePayload),
29282933
method: 'GET', responseType: 'arraybuffer',
29292934
onload: async resp => {
2935+
speakBtn.dispatchEvent(new Event('mouseenter')) // update tooltip
29302936

29312937
// Update icons to Playing ones
29322938
speakSVGscroller.textContent = '' // rid Generating icons
@@ -2953,6 +2959,7 @@
29532959
speakBtn.style.cursor = 'pointer' // restore cursor
29542960
speakSVGscroller.textContent = speakSVGscroller.style.animation = '' // rid Playing icons
29552961
speakSVGscroller.append(speakSVGs.speak) // restore Speak icon
2962+
speakBtn.dispatchEvent(new Event('mouseenter')) // restore tooltip
29562963
}
29572964
}
29582965
},

bravegpt/greasemonkey/bravegpt.user.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
// @description:zu Yengeza izimpendulo ze-AI ku-Brave Search (inikwa amandla yi-GPT-4o!)
149149
// @author KudoAI
150150
// @namespace https://kudoai.com
151-
// @version 2025.2.8.1
151+
// @version 2025.2.8.2
152152
// @license MIT
153153
// @icon https://assets.bravegpt.com/images/icons/bravegpt/icon48.png?v=df624b0
154154
// @icon64 https://assets.bravegpt.com/images/icons/bravegpt/icon64.png?v=df624b0
@@ -3576,8 +3576,11 @@
35763576
const textToCopy = textContainer.textContent.replace(/^>> /, '').trim()
35773577
copyBtn.style.cursor = 'default' // remove finger
35783578
copyBtn.replaceChild(copySVGs.copied, copySVGs.copy) // change to Copied icon
3579-
setTimeout(() => { // restore icon/cursor after a bit
3580-
copyBtn.style.cursor = 'pointer' ; copyBtn.replaceChild(copySVGs.copy, copySVGs.copied) }, 1355)
3579+
copyBtn.dispatchEvent(new Event('mouseenter')) // update tooltip
3580+
setTimeout(() => { // restore icon/cursor/tooltip after a bit
3581+
copyBtn.replaceChild(copySVGs.copy, copySVGs.copied)
3582+
copyBtn.style.cursor = 'pointer' ; copyBtn.dispatchEvent(new Event('mouseenter'))
3583+
}, 1355)
35813584
navigator.clipboard.writeText(textToCopy) // copy text to clipboard
35823585
}
35833586

@@ -3650,6 +3653,8 @@
36503653
'linear-gradient(to right, transparent, black 20%, black 81%, transparent)' )
36513654
}
36523655

3656+
speakBtn.dispatchEvent(new Event('mouseenter')) // update tooltip
3657+
36533658
// Play reply
36543659
const wholeAnswer = appDiv.querySelector('pre').textContent
36553660
const cjsSpeakConfig = { voice: 2, pitch: 1, speed: 1.5, onend: handleAudioEnded }
@@ -3690,6 +3695,7 @@
36903695
+ encodeURIComponent(securePayload),
36913696
method: 'GET', responseType: 'arraybuffer',
36923697
onload: async resp => {
3698+
speakBtn.dispatchEvent(new Event('mouseenter')) // update tooltip
36933699

36943700
// Update icons to Playing ones
36953701
speakSVGscroller.textContent = '' // rid Generating icons
@@ -3716,6 +3722,7 @@
37163722
speakBtn.style.cursor = 'pointer' // restore cursor
37173723
speakSVGscroller.textContent = speakSVGscroller.style.animation = '' // rid Playing icons
37183724
speakSVGscroller.append(speakSVGs.speak) // restore Speak icon
3725+
speakBtn.dispatchEvent(new Event('mouseenter')) // restore tooltip
37193726
}
37203727
}
37213728
},

duckduckgpt/greasemonkey/duckduckgpt.user.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
// @description:zu Yengeza izimpendulo ze-AI ku-DuckDuckGo (inikwa amandla yi-GPT-4o!)
149149
// @author KudoAI
150150
// @namespace https://kudoai.com
151-
// @version 2025.2.8.1
151+
// @version 2025.2.8.2
152152
// @license MIT
153153
// @icon https://assets.ddgpt.com/images/icons/duckduckgpt/icon48.png?v=06af076
154154
// @icon64 https://assets.ddgpt.com/images/icons/duckduckgpt/icon64.png?v=06af076
@@ -3577,8 +3577,11 @@
35773577
const textToCopy = textContainer.textContent.replace(/^>> /, '').trim()
35783578
copyBtn.style.cursor = 'default' // remove finger
35793579
copyBtn.replaceChild(copySVGs.copied, copySVGs.copy) // change to Copied icon
3580-
setTimeout(() => { // restore icon/cursor after a bit
3581-
copyBtn.style.cursor = 'pointer' ; copyBtn.replaceChild(copySVGs.copy, copySVGs.copied) }, 1355)
3580+
copyBtn.dispatchEvent(new Event('mouseenter')) // update tooltip
3581+
setTimeout(() => { // restore icon/cursor/tooltip after a bit
3582+
copyBtn.replaceChild(copySVGs.copy, copySVGs.copied)
3583+
copyBtn.style.cursor = 'pointer' ; copyBtn.dispatchEvent(new Event('mouseenter'))
3584+
}, 1355)
35823585
navigator.clipboard.writeText(textToCopy) // copy text to clipboard
35833586
}
35843587

@@ -3650,6 +3653,8 @@
36503653
'linear-gradient(to right, transparent, black 20%, black 81%, transparent)' )
36513654
}
36523655

3656+
speakBtn.dispatchEvent(new Event('mouseenter')) // update tooltip
3657+
36533658
// Play reply
36543659
const wholeAnswer = appDiv.querySelector('pre').textContent
36553660
const cjsSpeakConfig = { voice: 2, pitch: 1, speed: 1.5, onend: handleAudioEnded }
@@ -3690,6 +3695,7 @@
36903695
+ encodeURIComponent(securePayload),
36913696
method: 'GET', responseType: 'arraybuffer',
36923697
onload: async resp => {
3698+
speakBtn.dispatchEvent(new Event('mouseenter')) // update tooltip
36933699

36943700
// Update icons to Playing ones
36953701
speakSVGscroller.textContent = '' // rid Generating icons
@@ -3716,6 +3722,7 @@
37163722
speakBtn.style.cursor = 'pointer' // restore cursor
37173723
speakSVGscroller.textContent = speakSVGscroller.style.animation = '' // rid Playing icons
37183724
speakSVGscroller.append(speakSVGs.speak) // restore Speak icon
3725+
speakBtn.dispatchEvent(new Event('mouseenter')) // restore tooltip
37193726
}
37203727
}
37213728
},

googlegpt/greasemonkey/googlegpt.user.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
// @description:zu Yengeza izimpendulo ze-AI ku-Google Search (inikwa amandla yi-Google Gemma + GPT-4o!)
150150
// @author KudoAI
151151
// @namespace https://kudoai.com
152-
// @version 2025.2.8.1
152+
// @version 2025.2.8.2
153153
// @license MIT
154154
// @icon https://assets.googlegpt.io/images/icons/googlegpt/black/icon48.png?v=59409b2
155155
// @icon64 https://assets.googlegpt.io/images/icons/googlegpt/black/icon64.png?v=59409b2
@@ -3750,8 +3750,11 @@
37503750
const textToCopy = textContainer.textContent.replace(/^>> /, '').trim()
37513751
copyBtn.style.cursor = 'default' // remove finger
37523752
copyBtn.replaceChild(copySVGs.copied, copySVGs.copy) // change to Copied icon
3753-
setTimeout(() => { // restore icon/cursor after a bit
3754-
copyBtn.style.cursor = 'pointer' ; copyBtn.replaceChild(copySVGs.copy, copySVGs.copied) }, 1355)
3753+
copyBtn.dispatchEvent(new Event('mouseenter')) // update tooltip
3754+
setTimeout(() => { // restore icon/cursor/tooltip after a bit
3755+
copyBtn.replaceChild(copySVGs.copy, copySVGs.copied)
3756+
copyBtn.style.cursor = 'pointer' ; copyBtn.dispatchEvent(new Event('mouseenter'))
3757+
}, 1355)
37553758
navigator.clipboard.writeText(textToCopy) // copy text to clipboard
37563759
}
37573760

@@ -3824,6 +3827,8 @@
38243827
'linear-gradient(to right, transparent, black 20%, black 81%, transparent)' )
38253828
}
38263829

3830+
speakBtn.dispatchEvent(new Event('mouseenter')) // update tooltip
3831+
38273832
// Play reply
38283833
const wholeAnswer = appDiv.querySelector('pre').textContent
38293834
const cjsSpeakConfig = { voice: 2, pitch: 1, speed: 1.5, onend: handleAudioEnded }
@@ -3864,6 +3869,7 @@
38643869
+ encodeURIComponent(securePayload),
38653870
method: 'GET', responseType: 'arraybuffer',
38663871
onload: async resp => {
3872+
speakBtn.dispatchEvent(new Event('mouseenter')) // update tooltip
38673873

38683874
// Update icons to Playing ones
38693875
speakSVGscroller.textContent = '' // rid Generating icons
@@ -3890,6 +3896,7 @@
38903896
speakBtn.style.cursor = 'pointer' // restore cursor
38913897
speakSVGscroller.textContent = speakSVGscroller.style.animation = '' // rid Playing icons
38923898
speakSVGscroller.append(speakSVGs.speak) // restore Speak icon
3899+
speakBtn.dispatchEvent(new Event('mouseenter')) // restore tooltip
38933900
}
38943901
}
38953902
},

0 commit comments

Comments
 (0)