aboutsummaryrefslogtreecommitdiffstats
path: root/static
diff options
context:
space:
mode:
Diffstat (limited to 'static')
-rw-r--r--static/app.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/static/app.js b/static/app.js
index b824667..cbc0f0a 100644
--- a/static/app.js
+++ b/static/app.js
@@ -284,7 +284,8 @@ function touched() {
}
dimmer.addEventListener("click", () => { dimmer.hidden = true; tablet("undim"); });
document.addEventListener("pointerdown", touched, true);
-fetch("/api/tablet").then((r) => r.json()).then((t) => { dimAfter = t.dim_after ?? 0; touched(); }).catch(() => {});
+// A fresh page is not dimmed, so a dim left by an earlier server goes too.
+fetch("/api/tablet").then((r) => r.json()).then((t) => { dimAfter = t.dim_after ?? 0; tablet("undim"); touched(); }).catch(() => {});
document.addEventListener("visibilitychange", () => {
if (document.visibilityState === "visible") {