Skip to content

Commit ad07041

Browse files
committed
Optimized event callbackcs using destructuring ↞ [auto-sync from https://github.com/adamlui/ai-web-extensions/tree/main/chatgpt-auto-refresh]
1 parent ad5736e commit ad07041

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

chatgpt/chatgpt-auto-refresh/chatgpt-auto-refresh.user.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@
220220
// @description:zu *NGOKUPHEPHA* susa ukusetha kabusha ingxoxo yemizuzu eyi-10 + amaphutha enethiwekhi ahlala njalo + Ukuhlolwa kwe-Cloudflare ku-ChatGPT.
221221
// @author Adam Lui
222222
// @namespace https://github.com/adamlui
223-
// @version 2025.3.3
223+
// @version 2025.3.3.1
224224
// @license MIT
225225
// @icon https://assets.chatgptautorefresh.com/images/icons/openai/black/icon48.png?v=f11a0a8
226226
// @icon64 https://assets.chatgptautorefresh.com/images/icons/openai/black/icon64.png?v=f11a0a8
@@ -829,9 +829,9 @@
829829
this.update.scheme() ; this.update.state()
830830

831831
// Add hover/click listeners
832-
this.div.onmouseover = this.div.onmouseout = event => // trigger OpenAI hover overlay
832+
this.div.onmouseover = this.div.onmouseout = ({ type }) => // trigger OpenAI hover overlay
833833
this.div.style.setProperty('--item-background-color',
834-
`var(--sidebar-surface-${event.type == 'mouseover' ? 'secondary' : 'primary'})`)
834+
`var(--sidebar-surface-${ type == 'mouseover' ? 'secondary' : 'primary' })`)
835835
this.div.onclick = () => {
836836
settings.save('arDisabled', this.toggleInput.checked) ; syncConfigToUI({ updatedKey: 'arDisabled' })
837837
notify(`${app.msgs.menuLabel_autoRefresh}: ${toolbarMenu.state.words[+!config.arDisabled]}`)

0 commit comments

Comments
 (0)