From 1a0a3033209aa0d6376d39fd6adcb153f8bcdd88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Wed, 16 Dec 2020 21:52:34 -0500 Subject: Replace document.fullscreen for fullscreenElement This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time. More info in https://developer.mozilla.org/en-US/docs/Web/API/Document/fullscreen#Deprecated --- youtube/static/js/hotkeys.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'youtube') diff --git a/youtube/static/js/hotkeys.js b/youtube/static/js/hotkeys.js index b325e39..d8a2f53 100644 --- a/youtube/static/js/hotkeys.js +++ b/youtube/static/js/hotkeys.js @@ -26,7 +26,7 @@ function onKeyDown(e) { } else if (c == "f") { e.preventDefault(); - if (document.fullscreen) document.exitFullscreen(); + if (document.fullscreenElement) document.exitFullscreen(); else v.requestFullscreen(); } else if (c == "m") { -- cgit v1.2.3