Skip to content

Commit

Permalink
Condensed event check in modals.handlers.keys() ↞ [auto-sync from h…
Browse files Browse the repository at this point in the history
  • Loading branch information
kudo-sync-bot committed Dec 20, 2024
1 parent fd0e682 commit 93ac591
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions greasemonkey/amazongpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// @description Adds the magic of AI to Amazon shopping
// @author KudoAI
// @namespace https://kudoai.com
// @version 2024.12.19.3
// @version 2024.12.19.4
// @license MIT
// @icon https://amazongpt.kudoai.com/assets/images/icons/amazongpt/black-gold-teal/icon48.png?v=0fddfc7
// @icon64 https://amazongpt.kudoai.com/assets/images/icons/amazongpt/black-gold-teal/icon64.png?v=0fddfc7
Expand Down Expand Up @@ -905,7 +905,7 @@

key(event) { // to dismiss native modals
log.caller = 'modals.handlers.key()'
if (['Escape', 'Esc'].includes(event.key) || event.keyCode == 27) {
if (event.key.startsWith('Esc') || event.keyCode == 27) {
log.debug('Escape pressed')
const modal = document.querySelector('[class$="-modal"]')
if (modal) modals.hide(modal)
Expand Down

0 comments on commit 93ac591

Please sign in to comment.