Polyfill hashchange Event oldURL and newURL attributes for IE 9+
Addthefollowingcodebeforeyourcode,thenitwillprepareoldURLandnewURLforyou.(function(){
if(!window.HashChangeEvent){
varlastURL=document.URL;
window.addEventListener("hashchange",function(e){
varoldURL=