aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/static/js/hotkeys.js
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2022-01-29 11:06:47 -0500
committerJesús <heckyel@hyperbola.info>2022-01-29 11:06:47 -0500
commit12c0daa58a145be9df67d35e6ccf5217e0e41e69 (patch)
treeb23001e4e6fd6662b3d9cbd4f23d9f5f827f0370 /youtube/static/js/hotkeys.js
parent0f58f1d114725fc761d03ba5826f560fd74cbd2f (diff)
downloadyt-local-12c0daa58a145be9df67d35e6ccf5217e0e41e69.tar.lz
yt-local-12c0daa58a145be9df67d35e6ccf5217e0e41e69.tar.xz
yt-local-12c0daa58a145be9df67d35e6ccf5217e0e41e69.zip
hotkeys.js: fix 'f'
Diffstat (limited to 'youtube/static/js/hotkeys.js')
-rw-r--r--youtube/static/js/hotkeys.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/youtube/static/js/hotkeys.js b/youtube/static/js/hotkeys.js
index 2cd2336..7906cf9 100644
--- a/youtube/static/js/hotkeys.js
+++ b/youtube/static/js/hotkeys.js
@@ -26,8 +26,17 @@ function onKeyDown(e) {
}
else if (c == "f") {
e.preventDefault();
- if (document.fullscreenElement && document.fullscreenElement.nodeName == 'VIDEO') {document.exitFullscreen();}
- else {v.requestFullscreen()};
+ if (data.settings.video_player == 1) {
+ player.fullscreen.toggle()
+ }
+ else {
+ if (document.fullscreen) {
+ document.exitFullscreen()
+ }
+ else {
+ v.requestFullscreen()
+ }
+ }
}
else if (c == "m") {
if (v.muted == false) {v.muted = true;}