1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

Suppress history when changing the permalink URL

This commit is contained in:
Jermolene 2014-05-05 21:51:54 +01:00
parent 56251dc1f8
commit 4e101e240c

View File

@ -113,7 +113,8 @@ function updateLocationHash() {
$tw.locationHash = "#" + encodeURIComponent(targetTiddler) + ":" + encodeURIComponent($tw.utils.stringifyList(storyList));
// Only change the location hash if we must, thus avoiding unnecessary onhashchange events
if($tw.utils.getLocationHash() !== $tw.locationHash) {
window.location.hash = $tw.locationHash;
// We use replace so that browser history isn't affected
window.location.replace(window.location.toString().split("#")[0] + $tw.locationHash);
}
}