diff options
| author | William Hergès <anhgelus@anhgelus.world> | 2024-12-10 20:47:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-10 20:47:56 +0100 |
| commit | 0149f9905c2830441d9ccfeccbb02e4ebf60a0d8 (patch) | |
| tree | 52ffaeaea8534a2f4771a2c8a353b37f6a97f566 /index.ts | |
| parent | 730ec347582289efbc0cd1c48e4c243d4c4920d6 (diff) | |
| parent | 40fe301b5462b84e06747ff30add26b4259d38a4 (diff) | |
Merge pull request #1 from anhgelus/feat/custom-page
[Feat] Custom page
Diffstat (limited to 'index.ts')
| -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, |
