mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-12 10:20:26 +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
|
Select the appropriate saver module and set it up
|
||||||
*/
|
*/
|
||||||
var DownloadSaver = function() {
|
var DownloadSaver = function(wiki) {
|
||||||
};
|
};
|
||||||
|
|
||||||
DownloadSaver.prototype.save = function(text) {
|
DownloadSaver.prototype.save = function(text) {
|
||||||
@ -28,6 +28,7 @@ DownloadSaver.prototype.save = function(text) {
|
|||||||
link.setAttribute("download","tiddlywiki.html");
|
link.setAttribute("download","tiddlywiki.html");
|
||||||
}
|
}
|
||||||
link.click();
|
link.click();
|
||||||
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -12,7 +12,7 @@ Handles saving changes via Firefox's XUL APIs
|
|||||||
/*global $tw: false */
|
/*global $tw: false */
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var FirefoxSaver = function() {
|
var FirefoxSaver = function(wiki) {
|
||||||
};
|
};
|
||||||
|
|
||||||
FirefoxSaver.prototype.save = function(text) {
|
FirefoxSaver.prototype.save = function(text) {
|
||||||
|
@ -488,7 +488,7 @@ exports.initSavers = function(moduleType) {
|
|||||||
for(var t=0; t<$tw.plugins.moduleTypes[moduleType].length; t++) {
|
for(var t=0; t<$tw.plugins.moduleTypes[moduleType].length; t++) {
|
||||||
var saver = $tw.plugins.moduleTypes[moduleType][t];
|
var saver = $tw.plugins.moduleTypes[moduleType][t];
|
||||||
if(saver.canSave()) {
|
if(saver.canSave()) {
|
||||||
this.savers.push(saver.create());
|
this.savers.push(saver.create(this));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Sort the savers into priority order
|
// Sort the savers into priority order
|
||||||
|
Loading…
Reference in New Issue
Block a user