From 56b906723c575034e868c5d65d59e0eecd091140 Mon Sep 17 00:00:00 2001 From: adrien Date: Tue, 27 Jan 2026 08:56:28 +0100 Subject: [PATCH] fullscreen checkbox --- index.html | 6 ++++++ js/app.js | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/index.html b/index.html index dd7c702..631a5d1 100644 --- a/index.html +++ b/index.html @@ -79,6 +79,12 @@
+
+
+ + +
+
Partie diff --git a/js/app.js b/js/app.js index 255b9f3..4382125 100644 --- a/js/app.js +++ b/js/app.js @@ -13,9 +13,28 @@ window.onload = function(event) { selectedStyleSheet.href = stylesheetSelect.value favicon = document.querySelector("link[rel~='icon']") + fullscreenCheckbox.onchange = function() { + if (this.checked) { + document.documentElement.requestFullscreen() + } else { + document.exitFullscreen() + } + } + restart() } +document.onfullscreenchange = function() { + if (document.fullscreenElement) { + fullscreenCheckbox.checked = true + } else { + fullscreenCheckbox.checked = false + } +} +document.onfullscreenerror = function() { + fullscreenCheckbox.checked = false +} + function restart() { stats.modal.hide() holdQueue.init()