diff options
| author | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-06 19:15:43 +0200 |
|---|---|---|
| committer | Anhgelus Morhtuuzh <william@herges.fr> | 2025-10-06 19:15:43 +0200 |
| commit | 412a77b7c1ba1819f4bf1c0697ddd19d7af21e19 (patch) | |
| tree | 911f3b54bc4bf05f7cfb819c31a08219e7b5ac59 /frontend/index.ts | |
| parent | 2aedff3d2bbdcad93d6ca0ec883c446c703cafaa (diff) | |
fix(frontend): malformed title and quote after hot update
Diffstat (limited to 'frontend/index.ts')
| -rw-r--r-- | frontend/index.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/frontend/index.ts b/frontend/index.ts index 1d87f0a..a00854f 100644 --- a/frontend/index.ts +++ b/frontend/index.ts @@ -21,10 +21,10 @@ function setupAnchors() { document.addEventListener("htmx:afterSettle", e => { if (e.detail.xhr === undefined) return const title = e.detail.xhr.getResponseHeader("Updated-Title") - if (title?.length !== 0) document.title = title + if (title?.length !== 0) document.title = decodeURIComponent(title).replaceAll("+", " ") const quote = e.detail.xhr.getResponseHeader("Updated-Quote") if (quote?.length !== 0) - document.querySelector("#quote")!.innerHTML = "« " + quote + " »" + document.querySelector("#quote")!.innerHTML = "« " + decodeURIComponent(quote).replaceAll("+", " ") + " »" setupAnchors() }) |
