Merge pull request #1238 from Drakor/fixDownloadSavingHandler

Filename will now be set to "tiddlywiki.html" when path does not contain...
print-window-tiddler
Jeremy Ruston 2014-12-16 14:03:17 +00:00
commit 182c2428ca
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -26,10 +26,11 @@ DownloadSaver.prototype.save = function(text,method,callback,options) {
var p = document.location.pathname.lastIndexOf("/");
if(p !== -1) {
filename = document.location.pathname.substr(p+1);
} else {
filename = "tiddlywiki.html";
}
}
if(!filename) {
filename = "tiddlywiki.html";
}
// Set up the link
var link = document.createElement("a");
link.setAttribute("target","_blank");