diff options
| author | Anhgelus Morhtuuzh <anhgelus@anhgelus.world> | 2024-12-10 20:39:13 +0100 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <anhgelus@anhgelus.world> | 2024-12-10 20:39:28 +0100 |
| commit | 40fe301b5462b84e06747ff30add26b4259d38a4 (patch) | |
| tree | 52ffaeaea8534a2f4771a2c8a353b37f6a97f566 | |
| parent | 8f86a7299d75b2905e4e6eb61f43750c51ed48e4 (diff) | |
fix(navigation): not updating style and background image
| -rw-r--r-- | index.ts | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -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, |
