From 184532558865cdad761d977358e1428f600438cc Mon Sep 17 00:00:00 2001 From: khadar1020 Date: Sun, 3 Dec 2023 12:41:28 +0530 Subject: [PATCH] fullscreen --- index.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/index.html b/index.html index b31d0dd28c..a9197d4c15 100644 --- a/index.html +++ b/index.html @@ -876,6 +876,16 @@ count = 0; } } + document.addEventListener('fullscreenchange', handleFullscreenChange); + document.addEventListener('webkitfullscreenchange', handleFullscreenChange); + document.addEventListener('mozfullscreenchange', handleFullscreenChange); + document.addEventListener('MSFullscreenChange', handleFullscreenChange); + + function handleFullscreenChange() { + var iconCode = document.querySelector('#FullScrIcon'); + count = document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement ? 1 : 0; + iconCode.textContent = count ? '\ue5d1' : '\ue5d0'; + }