This commit is contained in:
myw
2026-07-16 16:53:38 +08:00 Unverified
parent 6b44647d4e
commit d8942c236a
22 changed files with 263 additions and 240 deletions
+5 -4
View File
@@ -65,12 +65,13 @@ script.
})
document.addEventListener('pjax:error', e => {
if (e.request.status === 404) {
const responseURL = e.request && e.request.responseURL
if (e.request && e.request.status === 404) {
!{theme.error_404 && theme.error_404.enable}
? pjax.loadUrl('!{url_for("/404.html")}')
: window.location.href = e.request.responseURL
} else {
window.location.href = e.request.responseURL
: responseURL && (window.location.href = responseURL)
} else if (responseURL) {
window.location.href = responseURL
}
})
})