aboutsummaryrefslogtreecommitdiff
path: root/web/script
diff options
context:
space:
mode:
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()
}
}