I'd do `window.location.hash.substring(1)`, unless there's a reason you're actually replacing all `#`'s