mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-15 19:22:52 +02:00
fix: back button fallback logic
This commit is contained in:
parent
68525c8c41
commit
f7ac92fd75
1 changed files with 6 additions and 0 deletions
|
@ -21,6 +21,12 @@ function setupBackButton() {
|
||||||
if (window.history.length > 1) {
|
if (window.history.length > 1) {
|
||||||
window.history.back()
|
window.history.back()
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
const siteTitleLink = document.getElementById('site-title-link')
|
||||||
|
if (siteTitleLink) {
|
||||||
|
siteTitleLink.click()
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue