diff options
author | metamuffin <metamuffin@disroot.org> | 2023-10-22 15:14:25 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-10-22 15:14:25 +0200 |
commit | d729b5199cd8740ef203b509079dd2aed0d70e23 (patch) | |
tree | 27a0a02e4b9927a940e8e0c9cbb6ec9ee28febbd /web | |
parent | 18823ebd3533f7d978c9725f739b9bc25e51d820 (diff) | |
download | jellything-d729b5199cd8740ef203b509079dd2aed0d70e23.tar jellything-d729b5199cd8740ef203b509079dd2aed0d70e23.tar.bz2 jellything-d729b5199cd8740ef203b509079dd2aed0d70e23.tar.zst |
change url before content load
Diffstat (limited to 'web')
-rw-r--r-- | web/script/transition.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web/script/transition.ts b/web/script/transition.ts index eedc72d..2bf2a7b 100644 --- a/web/script/transition.ts +++ b/web/script/transition.ts @@ -57,11 +57,11 @@ function prepare_load(href: string, back?: boolean) { return show_error("unknown error when fetching page") } const [head, body] = rt.split("<head>")[1].split("</head>") + if (!back) window.history.pushState({}, "", href) document.head.innerHTML = head document.body.outerHTML = body globalThis.dispatchEvent(new Event("DOMContentLoaded")) fade(true) - if (!back) window.history.pushState({}, "", href) patch_page() } } |