diff options
| author | William Hergès <william@herges.fr> | 2025-08-29 17:19:14 +0200 |
|---|---|---|
| committer | William Hergès <william@herges.fr> | 2025-08-29 17:19:14 +0200 |
| commit | f6ff8f4d1ae95bb229b3142a689cb6a68d12198f (patch) | |
| tree | 09c275f4b74950e9d564323a94102f87875c3007 | |
| parent | a5bcd96fe9604ed48d8ca115e4b300690dee4b36 (diff) | |
fix(style): not everything loaded after custom page switch
| -rw-r--r-- | index.ts | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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, |
