diff options
Diffstat (limited to 'web/script/transition.ts')
-rw-r--r-- | web/script/transition.ts | 6 |
1 files changed, 3 insertions, 3 deletions
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<void>(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) }) } |