1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-26 19:47:20 +00:00

Disable plugins in safe mode

Fixes #820
This commit is contained in:
Jermolene 2014-09-08 19:50:48 +01:00
parent 210d7fbc23
commit ac54fe3326

View File

@ -1103,7 +1103,7 @@ $tw.Wiki.prototype.processSafeMode = function() {
// Assemble a report tiddler // Assemble a report tiddler
var titleReportTiddler = "TiddlyWiki Safe Mode", var titleReportTiddler = "TiddlyWiki Safe Mode",
report = []; report = [];
report.push("TiddlyWiki has been started in [[safe mode|http://tiddlywiki.com/static/SafeMode.html]]. Most customisations have been disabled by renaming the following tiddlers:") report.push("TiddlyWiki has been started in [[safe mode|http://tiddlywiki.com/static/SafeMode.html]]. All plugins are temporarily disabled. Most customisations have been disabled by renaming the following tiddlers:")
// Delete the overrides // Delete the overrides
overrides.forEach(function(title) { overrides.forEach(function(title) {
var tiddler = self.getTiddler(title), var tiddler = self.getTiddler(title),
@ -1752,7 +1752,7 @@ $tw.boot.startup = function(options) {
} }
// Unpack plugin tiddlers // Unpack plugin tiddlers
$tw.wiki.readPluginInfo(); $tw.wiki.readPluginInfo();
$tw.wiki.registerPluginTiddlers("plugin"); $tw.wiki.registerPluginTiddlers("plugin",$tw.safeMode ? ["$:/core"] : undefined);
$tw.wiki.unpackPluginTiddlers(); $tw.wiki.unpackPluginTiddlers();
// Process "safe mode" // Process "safe mode"
if($tw.safeMode) { if($tw.safeMode) {