mirror of
https://github.com/myronblair/jarvis
synced 2026-06-30 17:50:23 -05:00
feat: kiosk mode CSS hiding (safe) — no voice JS patches
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user