Just give it back.
if (window.location.hash) {
window.location = window.location.hash.substring(1);
return;
}
Note that the script will still be parsed to the end, so it must be valid JavaScript in its entirety. But I think you meant "interpreted" in the title.
source
share