From 12c0daa58a145be9df67d35e6ccf5217e0e41e69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Sat, 29 Jan 2022 11:06:47 -0500 Subject: hotkeys.js: fix 'f' --- youtube/static/js/hotkeys.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'youtube/static/js') 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;} -- cgit v1.2.3