[javascript] How to detect if URL has changed after hash in JavaScript