Skip to content

Commit

Permalink
Refactored clickHandler() event check in chatgpt.alert() for read…
Browse files Browse the repository at this point in the history
…ability ↞ [auto-sync from https://github.com/KudoAI/chatgpt.js]
  • Loading branch information
kudo-sync-bot committed Dec 20, 2024
1 parent 8f13def commit 6d3a1a8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion starters/chrome/extension/lib/chatgpt.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ const chatgpt = {

// Define click/key handlers
const clickHandler = event => { // explicitly defined to support removal post-dismissal
if (event.target == event.currentTarget || event.target instanceof SVGPathElement) dismissAlert(); };
if (event.target == event.currentTarget || event.target.closest('[class*="-close-btn]')) dismissAlert(); };
const keyHandler = event => { // to dismiss active alert
if (/^(?: |Space|Enter|Return|Esc)/.test(event.key) || [32, 13, 27].includes(event.keyCode)) {
for (const alertId of alertQueue) { // look to handle only if triggering alert is active
Expand Down
2 changes: 1 addition & 1 deletion starters/chrome/extension/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "ChatGPT Extension",
"short_name": "ChatGPT 🧩",
"description": "A Chromium extension template to start using chatgpt.js like a boss!",
"version": "2024.12.19",
"version": "2024.12.20",
"author": "KudoAI",
"homepage_url": "https://github.com/KudoAI/chatgpt.js-chrome-starter",
"icons": {
Expand Down

0 comments on commit 6d3a1a8

Please sign in to comment.