Imagine, someone types http://example.com/somepage#someanchor in his browser address bar. How could I intercept this call to the anchor, display the page normally (don't scroll to the anchor) and do something instead in javascript, like alerting 'someanchor'. All in js, no server side redirects (to something like somepage?anchor=someanchor).
Any ideas? Is this possible at all? It would be easy to intercept clicks to anchors, I control, but this is not the case here.