1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-09-09 14:26:07 +00:00

Remove support for browser-startup modules

Instead support startup modules that stipulate which platform they
require.

Also include docs updates and fixes to fullscreen plugin
This commit is contained in:
Jermolene
2014-05-03 17:49:20 +01:00
parent 749582ede0
commit 78ba57d55d
11 changed files with 34 additions and 34 deletions

View File

@@ -1773,9 +1773,20 @@ $tw.boot.executeNextStartupTask = function() {
};
$tw.boot.isStartupTaskEligible = function(taskModule) {
var t;
// Check that the platform is correct
var platforms = taskModule.platforms;
if(platforms) {
for(t=0; t<platforms.length; t++) {
if((platforms[t] === "browser" && !$tw.browser) || (platforms[t] === "node" && !$tw.node)) {
return false;
}
}
}
// Check that all of the tasks that we must be performed after has been done
var after = taskModule.after;
if(after) {
for(var t=0; t<after.length; t++) {
for(t=0; t<after.length; t++) {
if(!$tw.boot.executedStartupModules[after[t]]) {
return false;
}