Created
August 27, 2019 02:18
-
-
Save MikeCheng1208/ceb3b3895aa9b3e894dbd2b5b7b20651 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.history.pushState(null, null, "#"); | |
window.addEventListener("hashchange", e=> { | |
console.log('Hash 更改後觸發'); | |
}); | |
window.addEventListener("popstate", e=> { | |
window.location.replace('https://medium.com/@Mike_Cheng1208'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment