aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/static/js
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2020-12-16 21:58:30 -0500
committerJesús <heckyel@hyperbola.info>2020-12-16 21:58:30 -0500
commit8443063fc48ef5d4a9d517c9999e17477b7a7123 (patch)
tree380a3d9d05548c88de3b6b325b370ad80647ce00 /youtube/static/js
parent1a0a3033209aa0d6376d39fd6adcb153f8bcdd88 (diff)
downloadyt-local-8443063fc48ef5d4a9d517c9999e17477b7a7123.tar.lz
yt-local-8443063fc48ef5d4a9d517c9999e17477b7a7123.tar.xz
yt-local-8443063fc48ef5d4a9d517c9999e17477b7a7123.zip
Hotkeys.js: improve fullscreen
Diffstat (limited to 'youtube/static/js')
-rw-r--r--youtube/static/js/hotkeys.js4
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;}