How to get everything before the hash from the address bar with Javascript?
you can try to subtract the has from the location
I use:
window.location.href.replace(window.location.hash, '');
This took me 2s to Google: http://davidwalsh.name/javascript-window-location
You want to take the href and split it on the '#', easy enough to do in JS.