JS Detecte a mudança de hash
// Event listener
window.addEventListener("hashchange", e=>console.log('changed'), {});
// Event handler
window.onhashchange = e => console.log('changed');
// HTML event handler
<body onhashchange="funcRef();">
P. Tune