added window.onhashchanged event handler