considered using `onhashchange` here isntead?