1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-29 21:09:56 +00:00

Separate $tw.boot.startup into three functions (#4602)

* Update boot.js

* Update boot.js
This commit is contained in:
Arlen22 2020-08-28 10:43:42 -04:00 committed by GitHub
parent 8497e5b95d
commit 4f376fba35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2172,8 +2172,7 @@ $tw.loadTiddlersNode = function() {
/* /*
Startup TiddlyWiki Startup TiddlyWiki
*/ */
$tw.boot.startup = function(options) { $tw.boot.initStartup = function(options) {
options = options || {};
// Get the URL hash and check for safe mode // Get the URL hash and check for safe mode
$tw.locationHash = "#"; $tw.locationHash = "#";
if($tw.browser && !$tw.node) { if($tw.browser && !$tw.node) {
@ -2306,6 +2305,9 @@ $tw.boot.startup = function(options) {
return result; return result;
} }
} }
};
$tw.boot.loadStartup = function(options){
// Load tiddlers // Load tiddlers
if($tw.boot.tasks.readBrowserTiddlers) { if($tw.boot.tasks.readBrowserTiddlers) {
$tw.loadTiddlersBrowser(); $tw.loadTiddlersBrowser();
@ -2318,6 +2320,8 @@ $tw.boot.startup = function(options) {
} }
// Give hooks a chance to modify the store // Give hooks a chance to modify the store
$tw.hooks.invokeHook("th-boot-tiddlers-loaded"); $tw.hooks.invokeHook("th-boot-tiddlers-loaded");
}
$tw.boot.execStartup = function(options){
// Unpack plugin tiddlers // Unpack plugin tiddlers
$tw.wiki.readPluginInfo(); $tw.wiki.readPluginInfo();
$tw.wiki.registerPluginTiddlers("plugin",$tw.safeMode ? ["$:/core"] : undefined); $tw.wiki.registerPluginTiddlers("plugin",$tw.safeMode ? ["$:/core"] : undefined);
@ -2346,6 +2350,16 @@ $tw.boot.startup = function(options) {
$tw.boot.disabledStartupModules = $tw.boot.disabledStartupModules || []; $tw.boot.disabledStartupModules = $tw.boot.disabledStartupModules || [];
// Repeatedly execute the next eligible task // Repeatedly execute the next eligible task
$tw.boot.executeNextStartupTask(options.callback); $tw.boot.executeNextStartupTask(options.callback);
}
/*
Startup TiddlyWiki
*/
$tw.boot.startup = function(options) {
options = options || {};
// Get the URL hash and check for safe mode
$tw.boot.initStartup(options);
$tw.boot.loadStartup(options);
$tw.boot.execStartup(options);
}; };
/* /*