From f4f3640b2af510ccfd31ec4509fb5b9ba5b3da15 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Mon, 29 Jan 2024 11:09:43 +0100 Subject: player: idle inhibit --- web/script/transition.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'web/script/transition.ts') diff --git a/web/script/transition.ts b/web/script/transition.ts index 4cbab41..ce0cd94 100644 --- a/web/script/transition.ts +++ b/web/script/transition.ts @@ -7,7 +7,7 @@ import { e } from "./jshelper/src/element.ts"; -const duration = 200 +const DURATION = 200 globalThis.addEventListener("DOMContentLoaded", () => { patch_page() }) @@ -79,7 +79,7 @@ function fade(dir: boolean) { overlay.style.backgroundColor = dir ? "black" : "transparent" overlay.style.animationName = dir ? "jst-fadeout" : "jst-fadein" overlay.style.animationFillMode = "forwards" - overlay.style.animationDuration = `${duration}ms` + overlay.style.animationDuration = `${DURATION}ms` document.body.appendChild(overlay) return new Promise(res => { setTimeout(() => { @@ -88,6 +88,6 @@ function fade(dir: boolean) { overlay.append(spinner_element = e("div", { class: "jst-spinner" }, "This is a spinner.")) }, 500) res() - }, duration) + }, DURATION) }) } -- cgit v1.2.3-70-g09d2