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:
parent
9404d670d3
commit
05d9cb60fc
@ -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;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user