Skip to content

Commit f0c65b9

Browse files
committed
Destructured listener params ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/amazongpt]
1 parent 90a8ab3 commit f0c65b9

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

chatgpt/amazongpt/amazongpt.user.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// @description Add AI chat & product/category summaries to Amazon shopping, powered by the latest LLMs like GPT-4o!
44
// @author KudoAI
55
// @namespace https://kudoai.com
6-
// @version 2025.9.5.3
6+
// @version 2025.9.5.4
77
// @license MIT
88
// @icon https://amazongpt.kudoai.com/assets/images/icons/app/black-gold-teal/icon48.png?v=8e8ed1c
99
// @icon64 https://amazongpt.kudoai.com/assets/images/icons/app/black-gold-teal/icon64.png?v=8e8ed1c
@@ -975,13 +975,13 @@
975975
;['width', 'height'].forEach(attr => svg.setAttribute(attr, 15))
976976
})
977977
downloadBtn.append(downloadSVGs.download)
978-
downloadBtn.onclick = event => { // download code, update icon + tooltip status
978+
downloadBtn.onclick = ({ currentTarget }) => { // download code, update icon + tooltip status
979979
if (!downloadBtn.firstChild.matches('[id$=download-icon]')) return // since clicking on DL'd icon
980980

981981
// Update cursor/icon/tooltip
982982
downloadBtn.style.cursor = 'default' // remove finger
983983
downloadBtn.firstChild.replaceWith(downloadSVGs.downloaded.cloneNode(true)) // change to DL'd icon
984-
tooltip.update(event.currentTarget) // to 'Code downloaded!'
984+
tooltip.update(currentTarget) // to 'Code downloaded!'
985985
setTimeout(() => { // restore icon/cursor/tooltip after a bit
986986
downloadBtn.firstChild.replaceWith(downloadSVGs.download.cloneNode(true))
987987
downloadBtn.style.cursor = 'pointer'
@@ -1224,8 +1224,8 @@
12241224
isDragging = true ; startX = event.clientX ; startLeft = sliderThumb.offsetLeft
12251225
document.body.append(fontSizeSlider.cursorOverlay)
12261226
})
1227-
document.addEventListener(inputEvents.move, event => {
1228-
if (isDragging) moveThumb(startLeft + event.clientX - startX) })
1227+
document.addEventListener(inputEvents.move, ({ clientX }) => {
1228+
if (isDragging) moveThumb(startLeft + clientX - startX) })
12291229
document.addEventListener(inputEvents.up, () => {
12301230
isDragging = false
12311231
if (fontSizeSlider.cursorOverlay?.isConnected) fontSizeSlider.cursorOverlay.remove()

0 commit comments

Comments
 (0)