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:
13
boot/boot.js
13
boot/boot.js
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user