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

Fix download saver for Safari 10.1

Safari now finally supports the ‘download’ attribute for the anchor
tag, meaning that the download saver works properly.
This commit is contained in:
Jermolene 2017-03-29 09:21:49 +01:00
parent 1e106a8f3d
commit b37178dda1

View File

@ -33,8 +33,6 @@ DownloadSaver.prototype.save = function(text,method,callback,options) {
}
// Set up the link
var link = document.createElement("a");
link.setAttribute("target","_blank");
link.setAttribute("rel","noopener noreferrer");
if(Blob !== undefined) {
var blob = new Blob([text], {type: "text/html"});
link.setAttribute("href", URL.createObjectURL(blob));