From d57446f1e4f440cb7403a8a0b46a89f8e5ae112d Mon Sep 17 00:00:00 2001 From: Jermolene Date: Thu, 14 Aug 2014 08:54:31 +0100 Subject: [PATCH] Remove $tw.syncer global from syncer.js --- core/modules/syncer.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/modules/syncer.js b/core/modules/syncer.js index 4d9fa6c5b..03680573c 100644 --- a/core/modules/syncer.js +++ b/core/modules/syncer.js @@ -58,30 +58,30 @@ function Syncer(options) { }); // Listen out for login/logout/refresh events in the browser $tw.rootWidget.addEventListener("tw-login",function() { - $tw.syncer.handleLoginEvent(); + self.handleLoginEvent(); }); $tw.rootWidget.addEventListener("tw-logout",function() { - $tw.syncer.handleLogoutEvent(); + self.handleLogoutEvent(); }); $tw.rootWidget.addEventListener("tw-server-refresh",function() { - $tw.syncer.handleRefreshEvent(); + self.handleRefreshEvent(); }); // Install the save action handlers $tw.rootWidget.addEventListener("tw-save-wiki",function(event) { - $tw.syncer.saveWiki({ + self.saveWiki({ template: event.param, downloadType: "text/plain" }); }); $tw.rootWidget.addEventListener("tw-auto-save-wiki",function(event) { - $tw.syncer.saveWiki({ + self.saveWiki({ method: "autosave", template: event.param, downloadType: "text/plain" }); }); $tw.rootWidget.addEventListener("tw-download-file",function(event) { - $tw.syncer.saveWiki({ + self.saveWiki({ method: "download", template: event.param, downloadType: "text/plain"