diff options
author | zrose584 <57181548+zrose584@users.noreply.github.com> | 2022-07-30 17:35:53 +0200 |
---|---|---|
committer | Jesus <jesus.estupinan@pragma.com.co> | 2022-08-07 02:50:05 +0800 |
commit | 65e7d85549935e862dfddc1c17fb4ed0c2d609ef (patch) | |
tree | 996a22673211133af635f4d32fd548b770b8abc7 /youtube/static/js/hotkeys.js | |
parent | 599a09d7fc6049aad409101d4bc582a889583391 (diff) | |
download | yt-local-65e7d85549935e862dfddc1c17fb4ed0c2d609ef.tar.lz yt-local-65e7d85549935e862dfddc1c17fb4ed0c2d609ef.tar.xz yt-local-65e7d85549935e862dfddc1c17fb4ed0c2d609ef.zip |
onKeyDown: ignore plyr CustomEvents
Diffstat (limited to 'youtube/static/js/hotkeys.js')
-rw-r--r-- | youtube/static/js/hotkeys.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/youtube/static/js/hotkeys.js b/youtube/static/js/hotkeys.js index d505125..b71972e 100644 --- a/youtube/static/js/hotkeys.js +++ b/youtube/static/js/hotkeys.js @@ -3,6 +3,7 @@ function onKeyDown(e) { // console.log(e); let v = QId("js-video-player"); + if (!e.isTrusted) return; // plyr CustomEvent let c = e.key.toLowerCase(); if (e.ctrlKey) return; else if (c == "k") { |