diff options
author | Jesús <heckyel@hyperbola.info> | 2022-01-29 11:06:47 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2022-01-29 11:06:47 -0500 |
commit | 12c0daa58a145be9df67d35e6ccf5217e0e41e69 (patch) | |
tree | b23001e4e6fd6662b3d9cbd4f23d9f5f827f0370 /youtube/static/js/hotkeys.js | |
parent | 0f58f1d114725fc761d03ba5826f560fd74cbd2f (diff) | |
download | yt-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.js | 13 |
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;} |