From 278b047c782b1785bfabee82fe636c673e4d7c48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=AA=20Ho=C3=A0i=20=C3=82n?= <98139595+HOAIAN2@users.noreply.github.com> Date: Sun, 13 Aug 2023 10:41:09 +0700 Subject: [PATCH] remove conflict on Instagram default keyboard shortcut --- README.md | 2 +- src/js/main.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9f32581..351e495 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ main(profileID) ## Keyboard shortcut -* Download: `D` `d` +* Download: `D` * Close: `esc` `C` `c` * Select all `S` `s` * Keyboard shortcut should work if you don't focus on special HTML Elements like `input` `textarea` or any element with ```textbox``` role (ex: comment, search, ...) diff --git a/src/js/main.js b/src/js/main.js index 0333958..292b0e4 100644 --- a/src/js/main.js +++ b/src/js/main.js @@ -281,7 +281,7 @@ function handleEvents() { const DOWNLOAD_BUTTON = document.querySelector('.download-button') const IGNORE_FOCUS_ELEMENTS = ['INPUT', 'TEXTAREA'] const ESC_EVENT_KEYS = ['Escape', 'C', 'c'] - const DOWNLOAD_EVENT_KEYS = ['D', 'd'] + const DOWNLOAD_EVENT_KEYS = ['D'] const SELECT_EVENT_KEYS = ['S', 's'] DOWNLOAD_BUTTON.addEventListener('click', handleDownload) function setTheme() {