From f6ff8f4d1ae95bb229b3142a689cb6a68d12198f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Fri, 29 Aug 2025 17:19:14 +0200 Subject: fix(style): not everything loaded after custom page switch --- index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.ts b/index.ts index e1feaec..e48401f 100644 --- a/index.ts +++ b/index.ts @@ -25,6 +25,10 @@ function changePage(href: string) { window.history.pushState({}, "", href) document.title = doc.title document.body = doc.body + document.head.querySelectorAll("style").forEach(e => document.head.removeChild(e)) + doc.head.querySelectorAll("style").forEach(e => { + document.head.appendChild(e) + }) setupEvents() scrollTo({ top: 0, -- cgit v1.2.3