From 17a9cdd1e37222d1ae1bd8e1f7139955710abf81 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Sat, 16 Mar 2013 11:06:44 +0000 Subject: [PATCH] Remove initSyncers() from wiki.js --- core/modules/startup.js | 10 +++++++++- core/modules/wiki.js | 15 --------------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/core/modules/startup.js b/core/modules/startup.js index dbcb48d35..ab512462d 100644 --- a/core/modules/startup.js +++ b/core/modules/startup.js @@ -28,7 +28,6 @@ exports.startup = function() { $tw.modules.applyMethods("tiddlerdeserializer",$tw.Wiki.tiddlerDeserializerModules); // Set up the wiki store $tw.wiki.initParsers(); - $tw.wiki.initSyncers(); // Set up the command modules $tw.Commander.initCommands(); // Get the default tiddlers @@ -73,6 +72,15 @@ exports.startup = function() { downloadType: "text/plain" }); },false); + // Install syncers + $tw.syncers = {}; + $tw.modules.forEachModuleOfType("syncer",function(title,module) { + if(module.name && module.syncer) { + $tw.syncers[module.name] = new module.syncer({ + wiki: $tw.wiki + }); + } + }); // Install the crypto event handlers document.addEventListener("tw-set-password",function(event) { $tw.passwordPrompt.createPrompt({ diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 7cfc9676c..25558152d 100644 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -587,21 +587,6 @@ exports.search = function(text,options) { return results; }; -/* -Initialise syncers -*/ -exports.initSyncers = function() { - this.syncers = {}; - var self = this; - $tw.modules.forEachModuleOfType("syncer",function(title,module) { - if(module.name && module.syncer) { - self.syncers[module.name] = new module.syncer({ - wiki: self - }); - } - }); -}; - /* Trigger a load for a tiddler if it is skinny. Returns the text, or undefined if the tiddler is missing, null if the tiddler is being lazily loaded. */