From 3153c588ecddfdc97cc8289720d36b1fb15ef236 Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Mon, 26 Oct 2020 17:28:57 +0000 Subject: [PATCH] Disable autosave in the upgrade wizard To address @pmario's suggestion here: https://github.com/Jermolene/TiddlyWiki5/issues/4879#issuecomment-704320381 --- core/modules/saver-handler.js | 2 +- plugins/tiddlywiki/upgrade/config.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/modules/saver-handler.js b/core/modules/saver-handler.js index 44dc130ff..a4b7f4a4e 100644 --- a/core/modules/saver-handler.js +++ b/core/modules/saver-handler.js @@ -153,7 +153,7 @@ SaverHandler.prototype.saveWiki = function(options) { var self = this, method = options.method || "save"; // Ignore autosave if disabled - if(method === "autosave" && this.wiki.getTiddlerText(this.titleAutoSave,"yes") !== "yes") { + if(method === "autosave" && ($tw.config.disableAutoSave || this.wiki.getTiddlerText(this.titleAutoSave,"yes") !== "yes")) { return false; } var variables = options.variables || {}, diff --git a/plugins/tiddlywiki/upgrade/config.js b/plugins/tiddlywiki/upgrade/config.js index 97d71f9cc..0c50f1fa7 100644 --- a/plugins/tiddlywiki/upgrade/config.js +++ b/plugins/tiddlywiki/upgrade/config.js @@ -20,6 +20,7 @@ exports.synchronous = true; exports.startup = function() { // See $tw.utils.decryptStoreAreaInteractive() in $:/core/modules/utils/crypto.js $tw.config.usePasswordVault = true; + $tw.config.disableAutoSave = true; }; })();