aboutsummaryrefslogtreecommitdiff
path: root/index.ts
diff options
context:
space:
mode:
authorAnhgelus Morhtuuzh <anhgelus@anhgelus.world>2024-12-10 20:39:13 +0100
committerAnhgelus Morhtuuzh <anhgelus@anhgelus.world>2024-12-10 20:39:28 +0100
commit40fe301b5462b84e06747ff30add26b4259d38a4 (patch)
tree52ffaeaea8534a2f4771a2c8a353b37f6a97f566 /index.ts
parent8f86a7299d75b2905e4e6eb61f43750c51ed48e4 (diff)
fix(navigation): not updating style and background image
Diffstat (limited to 'index.ts')
-rw-r--r--index.ts5
1 files changed, 1 insertions, 4 deletions
diff --git a/index.ts b/index.ts
index 24951c2..c3f46b0 100644
--- a/index.ts
+++ b/index.ts
@@ -23,10 +23,7 @@ function changePage(href: string) {
const doc = new DOMParser().parseFromString(html, "text/html")
window.history.pushState({}, "", href)
document.title = doc.title
- const distMain = doc.querySelector("main")
- const currentMain = document.querySelector("main")
- if (distMain === null || currentMain === null) document.body = doc.body
- else currentMain.innerHTML = distMain.innerHTML
+ document.body = doc.body
setupEvents()
scrollTo({
top: 0,