From cb19ff62a7ddbe130f2b3723ba16599a66e3df67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Herg=C3=A8s?= Date: Fri, 3 Oct 2025 19:15:58 +0200 Subject: feat(frontend): update quote after htmx reload --- frontend/index.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'frontend') diff --git a/frontend/index.ts b/frontend/index.ts index c337e43..13997b3 100644 --- a/frontend/index.ts +++ b/frontend/index.ts @@ -19,6 +19,9 @@ function setupAnchors() { document.addEventListener("htmx:afterSettle", e => { const title = e.detail.xhr.getResponseHeader("Updated-Title") if (title?.length !== 0) document.title = title + const quote = e.detail.xhr.getResponseHeader("Updated-Quote") + if (quote?.length !== 0) + document.querySelector("#quote")!.innerHTML = "« " + quote + " »" window.history.pushState({}, "", e.detail.pathInfo.finalRequestPath) setupAnchors() }) -- cgit v1.2.3