fullscreen checkbox

This commit is contained in:
2026-01-27 08:56:28 +01:00
parent 20b96da34b
commit 56b906723c
2 changed files with 25 additions and 0 deletions

View File

@@ -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()