mirror of
https://github.com/reonokiy/blog.nokiy.net.git
synced 2025-06-15 11:12:54 +02:00
fix: back button logic error
This commit is contained in:
parent
d2ebe60778
commit
82a2031342
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@
|
|||
<script>
|
||||
function setupBackButton() {
|
||||
document.getElementById('back-button')?.addEventListener('click', () => {
|
||||
if (document.referrer && document.referrer.includes(window.location.hostname)) {
|
||||
if (window.history.length > 1) {
|
||||
window.history.back()
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue