Skip to content
This repository has been archived by the owner on Aug 7, 2021. It is now read-only.

Option to clear URL hash #81

Open
lilybarrett opened this issue Apr 27, 2018 · 1 comment
Open

Option to clear URL hash #81

lilybarrett opened this issue Apr 27, 2018 · 1 comment

Comments

@lilybarrett
Copy link

I'd like an option to clear the URL hash when I choose (i.e., when manually scrolling to the top of the page). Right now, the URL always contains a hash for the previously selected element, even when you refresh the page.

@chriskilinc
Copy link

You could use this function to remove the hash.
It won't even reload your page!

removeHash() {
    window.history.pushState("", document.title, window.location.pathname
      + window.location.search);
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants