aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/static
diff options
context:
space:
mode:
Diffstat (limited to 'youtube/static')
-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;}