aboutsummaryrefslogtreecommitdiff
path: root/web/script
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-10-22 15:14:25 +0200
committermetamuffin <metamuffin@disroot.org>2023-10-22 15:14:25 +0200
commitd729b5199cd8740ef203b509079dd2aed0d70e23 (patch)
tree27a0a02e4b9927a940e8e0c9cbb6ec9ee28febbd /web/script
parent18823ebd3533f7d978c9725f739b9bc25e51d820 (diff)
downloadjellything-d729b5199cd8740ef203b509079dd2aed0d70e23.tar
jellything-d729b5199cd8740ef203b509079dd2aed0d70e23.tar.bz2
jellything-d729b5199cd8740ef203b509079dd2aed0d70e23.tar.zst
change url before content load
Diffstat (limited to 'web/script')
-rw-r--r--web/script/transition.ts2
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()
}
}