diff options
author | Jesús <heckyel@hyperbola.info> | 2020-12-16 21:58:30 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2020-12-16 21:58:30 -0500 |
commit | 8443063fc48ef5d4a9d517c9999e17477b7a7123 (patch) | |
tree | 380a3d9d05548c88de3b6b325b370ad80647ce00 | |
parent | 1a0a3033209aa0d6376d39fd6adcb153f8bcdd88 (diff) | |
download | yt-local-8443063fc48ef5d4a9d517c9999e17477b7a7123.tar.lz yt-local-8443063fc48ef5d4a9d517c9999e17477b7a7123.tar.xz yt-local-8443063fc48ef5d4a9d517c9999e17477b7a7123.zip |
Hotkeys.js: improve fullscreen
-rw-r--r-- | youtube/static/js/hotkeys.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube/static/js/hotkeys.js b/youtube/static/js/hotkeys.js index d8a2f53..2cd2336 100644 --- a/youtube/static/js/hotkeys.js +++ b/youtube/static/js/hotkeys.js @@ -26,8 +26,8 @@ function onKeyDown(e) { } else if (c == "f") { e.preventDefault(); - if (document.fullscreenElement) document.exitFullscreen(); - else v.requestFullscreen(); + if (document.fullscreenElement && document.fullscreenElement.nodeName == 'VIDEO') {document.exitFullscreen();} + else {v.requestFullscreen()}; } else if (c == "m") { if (v.muted == false) {v.muted = true;} |