aboutsummaryrefslogtreecommitdiff
path: root/index.ts
diff options
context:
space:
mode:
authorWilliam Hergès <anhgelus@anhgelus.world>2024-12-10 20:47:56 +0100
committerGitHub <noreply@github.com>2024-12-10 20:47:56 +0100
commit0149f9905c2830441d9ccfeccbb02e4ebf60a0d8 (patch)
tree52ffaeaea8534a2f4771a2c8a353b37f6a97f566 /index.ts
parent730ec347582289efbc0cd1c48e4c243d4c4920d6 (diff)
parent40fe301b5462b84e06747ff30add26b4259d38a4 (diff)
Merge pull request #1 from anhgelus/feat/custom-page
[Feat] Custom page
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,