From 5ec70212d553dd4c8224968562fedc2aac415b90 Mon Sep 17 00:00:00 2001 From: goodtube4u Date: Fri, 7 Nov 2025 17:51:48 +1000 Subject: [PATCH] Improved keyboard support --- goodtube.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/goodtube.js b/goodtube.js index 181568d..9cf8e3e 100644 --- a/goodtube.js +++ b/goodtube.js @@ -1052,8 +1052,8 @@ // Get the key pressed in lower case let keyPressed = event.key.toLowerCase(); - // Don't do anything IF we're holding control OR alt OR the command key (mac) OR we're not watching a video - if (event.ctrlKey || event.altKey || event.metaKey || !goodTube_helper_watchingVideo()) { + // Don't do anything IF we're holding control OR alt OR the command key (mac) OR we're not watching a video OR the "hide and mute ads" fallback is active + if (event.ctrlKey || event.altKey || event.metaKey || !goodTube_helper_watchingVideo() || goodTube_fallback) { return; } @@ -1099,8 +1099,8 @@ 'i' ]; - // Ensure we've pressed an allowed shortcut AND the "hide and mute ads" fallback is inactive - if (allowedShortcuts.includes(keyPressed) && !goodTube_fallback) { + // Ensure we've pressed an allowed shortcut + if (allowedShortcuts.includes(keyPressed)) { // Get the currently focused element let focusedElement = event.srcElement; let focusedElement_tag = false;