Glad it worked!
Longer-term, you might want to look into the excellent hash routing library: Routing, navigation with URL Hash
It takes care of the sort of thing you’re doing manually right now, and allows the user to use the Back button in the browser the way they’d expect to do so in a web app. It takes a little setup, but I wouldn’t create an app without it these days.