Fix/404 tux pattes #3

Merged
BlackAngelTV merged 66 commits from fix/404-tux-pattes into main 2026-10-02 21:00:06 +02:00
Showing only changes of commit ca7cbf98ec - Show all commits
+7 -1
View File
@@ -168,6 +168,13 @@
const injected = parsed.querySelector("[data-page-content]") ?? parsed.body;
main.innerHTML = injected.innerHTML.trim();
await injectPageScripts(parsed, response.url);
// Update document title from the fetched page if present, otherwise use generated title
const pageTitleEl = parsed.querySelector("title");
if (pageTitleEl && pageTitleEl.textContent && pageTitleEl.textContent.trim()) {
document.title = pageTitleEl.textContent.trim();
} else {
document.title = routeToTitle(route);
}
}
function render(route, { replaceHistory = false } = {}) {
@@ -177,7 +184,6 @@
.then(() => {
setActiveRoute(safeRoute);
setCanonicalUrl(safeRoute, replaceHistory);
document.title = routeToTitle(safeRoute);
window.scrollTo({ top: 0, behavior: "smooth" });
})
.catch((error) => {