1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-12-08 01:38:06 +00:00

WIP: Add support for dependencies between startup modules

See StartupMechanism for details.
This commit is contained in:
Jermolene
2014-05-03 16:32:18 +01:00
parent 2f32621024
commit b96aade28a
5 changed files with 93 additions and 4 deletions

View File

@@ -12,6 +12,10 @@ This is the main application logic for both the client and server
/*global $tw: false */
"use strict";
// Export name and synchronous status
exports.name = "startup";
exports.synchronous = true;
// Set to `true` to enable performance instrumentation
var PERFORMANCE_INSTRUMENTATION = false;
@@ -322,6 +326,7 @@ function updateLocationHash() {
targetTiddler = historyList[historyList.length-1].title;
}
$tw.locationHash = "#" + encodeURIComponent(targetTiddler) + ":" + encodeURIComponent($tw.utils.stringifyList(storyList));
// Only change the location hash if we must, thus avoiding unnecessary onhashchange events
if(window.location.hash !== $tw.locationHash) {
window.location.hash = $tw.locationHash;
}