From ddc62adc923b2668207c4c7a527ed221c9ba9393 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 9 Nov 2026 19:55:38 +0100 Subject: feat: fullscreen toggle for the tablet browser --- static/app.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'static/app.js') diff --git a/static/app.js b/static/app.js index ce3ec62..d125d69 100644 --- a/static/app.js +++ b/static/app.js @@ -186,6 +186,16 @@ async function boot() { showTab(tabs[saved] ? saved : "Dashboard"); } +const fullscreenButton = document.getElementById("fullscreen"); +fullscreenButton?.addEventListener("click", async () => { + try { + if (document.fullscreenElement) await document.exitFullscreen(); + else await document.documentElement.requestFullscreen(); + } catch { + // the browser refused; nothing to do + } +}); + document.addEventListener("visibilitychange", () => { if (document.visibilityState === "visible") refreshers.forEach((fn) => fn()); }); -- cgit v1.2.3