1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 00:50:28 +00:00

Passed host wiki to saver constructors

This commit is contained in:
Jeremy Ruston 2012-07-12 16:58:49 +01:00
parent 9404d670d3
commit 05d9cb60fc
3 changed files with 4 additions and 3 deletions

View File

@ -15,7 +15,7 @@ Handles saving changes via HTML5's download APIs
/*
Select the appropriate saver module and set it up
*/
var DownloadSaver = function() {
var DownloadSaver = function(wiki) {
};
DownloadSaver.prototype.save = function(text) {
@ -28,6 +28,7 @@ DownloadSaver.prototype.save = function(text) {
link.setAttribute("download","tiddlywiki.html");
}
link.click();
return true;
};
/*

View File

@ -12,7 +12,7 @@ Handles saving changes via Firefox's XUL APIs
/*global $tw: false */
"use strict";
var FirefoxSaver = function() {
var FirefoxSaver = function(wiki) {
};
FirefoxSaver.prototype.save = function(text) {

View File

@ -488,7 +488,7 @@ exports.initSavers = function(moduleType) {
for(var t=0; t<$tw.plugins.moduleTypes[moduleType].length; t++) {
var saver = $tw.plugins.moduleTypes[moduleType][t];
if(saver.canSave()) {
this.savers.push(saver.create());
this.savers.push(saver.create(this));
}
}
// Sort the savers into priority order