From a4b8551e0062ea3c939c11a9fa60ccf1a1d779bd Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Fri, 6 Dec 2019 16:23:15 +0000 Subject: [PATCH] Make the savetrail plugin work again --- core/modules/startup/startup.js | 1 + core/modules/syncer.js | 1 - editions/prerelease/tiddlywiki.info | 1 + plugins/tiddlywiki/savetrail/savetrail.js | 3 +-- 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/modules/startup/startup.js b/core/modules/startup/startup.js index 8a44695c4..84625fb9a 100755 --- a/core/modules/startup/startup.js +++ b/core/modules/startup/startup.js @@ -131,6 +131,7 @@ exports.startup = function() { wiki: $tw.wiki, syncadaptorClass: syncadaptorClass }); + $tw.syncadaptor = $tw.syncer.syncadaptor; // For backwards compatibility } // Setup the saver handler $tw.saverHandler = new $tw.SaverHandler({ diff --git a/core/modules/syncer.js b/core/modules/syncer.js index e074be02b..640798f02 100644 --- a/core/modules/syncer.js +++ b/core/modules/syncer.js @@ -67,7 +67,6 @@ function Syncer(options) { wiki: $tw.wiki, logger: this.logger }); - $tw.syncadaptor = this.syncadaptor; // For backwards compatibility // Listen out for changes to tiddlers this.wiki.addEventListener("change",function(changes) { // Filter the changes to just include ones that are being synced diff --git a/editions/prerelease/tiddlywiki.info b/editions/prerelease/tiddlywiki.info index 9a45db931..7cfc207af 100644 --- a/editions/prerelease/tiddlywiki.info +++ b/editions/prerelease/tiddlywiki.info @@ -10,6 +10,7 @@ "tiddlywiki/highlight", "tiddlywiki/markdown", "tiddlywiki/bibtex", + "tiddlywiki/savetrail", "tiddlywiki/external-attachments", "tiddlywiki/dynaview", "tiddlywiki/codemirror", diff --git a/plugins/tiddlywiki/savetrail/savetrail.js b/plugins/tiddlywiki/savetrail/savetrail.js index 69ef752a7..a3430fce2 100644 --- a/plugins/tiddlywiki/savetrail/savetrail.js +++ b/plugins/tiddlywiki/savetrail/savetrail.js @@ -26,10 +26,9 @@ var ENABLE_TIDDLER_TITLE = "$:/config/SaveTrailPlugin/enable", exports.startup = function() { $tw.savetrail = $tw.savetrail || {}; // Create a syncer to handle autosaving - $tw.savetrail.syncadaptor = new SaveTrailSyncAdaptor(); $tw.savetrail.syncer = new $tw.Syncer({ wiki: $tw.wiki, - syncadaptor: $tw.savetrail.syncadaptor, + syncadaptorClass: SaveTrailSyncAdaptor, titleSyncFilter: SYNC_DRAFTS_FILTER_TIDDLER_TITLE, logging: false, disableUI: true