1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-25 03:34:50 +00:00

Add support for downloading files

We were re-using the `tw-save-wiki` message both for saving the current
wiki and downloading a new wiki. Now we’ll use the separate
`tw-download-file` message for downloading.

Fixes #236
This commit is contained in:
Jermolene
2013-11-27 20:51:08 +00:00
parent 7175f1cbf1
commit 0956ae10a0
10 changed files with 36 additions and 11 deletions

View File

@@ -15,7 +15,11 @@ Handles saving changes via the TiddlyFox file extension
var TiddlyFoxSaver = function(wiki) {
};
TiddlyFoxSaver.prototype.save = function(text,callback) {
TiddlyFoxSaver.prototype.save = function(text,method,callback) {
// Bail out unless this is a save (rather than a download)
if(method !== "save") {
return false;
}
var messageBox = document.getElementById("tiddlyfox-message-box");
if(messageBox) {
// Get the pathname of this document