JavaScript erkennen URL -Hash -Änderung

window.addEventListener("onhashchange", function(){
    //url hash # has changed
});
Grepper