mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2025-12-26 03:51:14 -08:00
Suppress history when changing the permalink URL
This commit is contained in:
parent
56251dc1f8
commit
4e101e240c
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue