Skip to content

Instantly share code, notes, and snippets.

@mrTimofey
Created September 23, 2016 08:36
Show Gist options
  • Save mrTimofey/51989623c57c5ea29ba51770ac29f11a to your computer and use it in GitHub Desktop.
Save mrTimofey/51989623c57c5ea29ba51770ac29f11a to your computer and use it in GitHub Desktop.
Change hash without affecting history
let hash = window.location.hash.replace('#', '');
window.history.replaceState('', '', '#' + hash);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment