feat: kiosk mode CSS hiding (safe) — no voice JS patches

This commit is contained in:
2026-06-21 05:15:38 +00:00
parent 383de0146c
commit a6d4365f16
3 changed files with 30 additions and 12 deletions
+3
View File
@@ -1783,11 +1783,13 @@ async function toggleKiosk() {
if ("wakeLock" in navigator) {
try { _wakeLock = await navigator.wakeLock.request("screen"); } catch(e) {}
}
document.body.classList.add("kiosk-mode");
if (btn) { btn.textContent = "⧞ EXIT"; btn.style.color = "var(--cyan)"; }
} else {
const ex = document.exitFullscreen || document.webkitExitFullscreen || document.mozCancelFullScreen || document.msExitFullscreen;
if (ex) ex.call(document).catch(() => {});
if (_wakeLock) { _wakeLock.release().catch(() => {}); _wakeLock = null; }
document.body.classList.remove("kiosk-mode");
if (btn) { btn.textContent = "⧞ KIOSK"; btn.style.color = ""; }
if (!isTablet()) document.body.classList.remove("tablet-mode");
}
@@ -1803,6 +1805,7 @@ function _onFsChange() {
const btn = document.getElementById("kioskBtn");
if (!document.fullscreenElement && !document.webkitFullscreenElement) {
if (_wakeLock) { _wakeLock.release().catch(() => {}); _wakeLock = null; }
document.body.classList.remove("kiosk-mode");
if (btn) { btn.textContent = "⧞ KIOSK"; btn.style.color = ""; }
if (!isTablet()) document.body.classList.remove("tablet-mode");
}