Skip to content

Commit

Permalink
Replaced document.onkeydown to dismiss modals w/ `.addEventListener…
Browse files Browse the repository at this point in the history
…()` to accommodate potential other listeners ↞ [auto-sync from `adamlui/ai-web-extensions`]
  • Loading branch information
kudo-sync-bot committed Oct 20, 2024
1 parent df37c16 commit 6e45679
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions greasemonkey/duckduckgpt.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
// @description:zu Yengeza izimpendulo ze-AI ku-DuckDuckGo (inikwa amandla yi-GPT-4o!)
// @author KudoAI
// @namespace https://kudoai.com
// @version 2024.10.17.3
// @version 2024.10.19
// @license MIT
// @icon https://media.ddgpt.com/images/icons/duckduckgpt/icon48.png?af89302
// @icon64 https://media.ddgpt.com/images/icons/duckduckgpt/icon64.png?af89302
Expand Down Expand Up @@ -3694,7 +3694,7 @@
} else { appAlert('waitingResponse') ; get.reply(msgChain) }

// Add key listener to DISMISS modals
document.onkeydown = modals.keyHandler
document.addEventListener('keydown', modals.keyHandler)

// Observe for DDG SCHEME CHANGES to update DDGPT scheme if auto-scheme mode
new MutationObserver(handleSchemeChange).observe( // class changes from DDG appearance settings
Expand Down

0 comments on commit 6e45679

Please sign in to comment.