update: back button position and fallback logic

This commit is contained in:
radishzzz 2025-03-18 05:55:02 +00:00
parent cac96eca8c
commit eb49f1def1
2 changed files with 5 additions and 2 deletions

View file

@ -158,7 +158,10 @@ const mobileFooterMargin = isPost && themeConfig.comment?.waline?.serverURL
window.history.back()
}
else {
window.location.href = localizedHome
const siteTitle = document.querySelector(`h1 a[href="${localizedHome}"]`)
if (siteTitle) {
siteTitle.click()
}
}
})
}