Skip to content

Commit

Permalink
change location.href to location.replace
Browse files Browse the repository at this point in the history
  • Loading branch information
sk5s committed Nov 13, 2021
1 parent a44943a commit 7af98fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ <h1>This site need javascript to redirect. If javascript is disabled then you ne
let book = {
'test' : 'https://lab.sk5s.cyou/'
}
if (redirect !== null && book[redirect] !== '' && book[redirect] !== null) {
location.href = book[redirect];
if (redirect !== null && book[redirect] !== '' && book[redirect] !== undefined) {
window.location.replace(book[redirect])
} else {
location.href = defaultLink;
window.location.replace(defaultLink)
}
</script>
</body>
Expand Down

0 comments on commit 7af98fd

Please sign in to comment.