From b614dce91a5117cb4f413fa5737bca38a07a01c5 Mon Sep 17 00:00:00 2001 From: Joe-Dowd Date: Fri, 20 Mar 2020 19:55:29 +0000 Subject: [PATCH] Added more restricted characters --- src/options.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/options.ts b/src/options.ts index 86252256..f6a3d906 100644 --- a/src/options.ts +++ b/src/options.ts @@ -318,14 +318,14 @@ function activateKeybindChange(element: HTMLElement) { */ function keybindKeyPressed(element: HTMLElement, e: KeyboardEvent) { var key = e.key; - if (["Shift", "Control", "Meta", "Alt"].indexOf(key) !== -1) { + if (["Shift", "Control", "Meta", "Alt", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Tab"].indexOf(key) !== -1) { document.addEventListener("keydown", (e) => keybindKeyPressed(element, e), {once: true}); } else { let button = element.querySelector(".trigger-button"); let option = element.getAttribute("sync-option"); // Don't allow keys which are already listened for by youtube - let restrictedKeys = "1234567890,.jklftcibmJKLFTCIBMN/<> -"; + let restrictedKeys = "1234567890,.jklftcibmJKLFTCIBMNP/<> -+"; if (restrictedKeys.indexOf(key) !== -1 ) { element.querySelector(".option-hidden-section").classList.add("hidden"); button.classList.remove("disabled");