Attempting to fix #57

This commit is contained in:
Eli Grey
2013-12-27 14:32:57 -05:00
parent 1f4b2f1724
commit 9d69e4b273
+8 -4
View File
@@ -1,6 +1,6 @@
/* FileSaver.js /* FileSaver.js
* A saveAs() FileSaver implementation. * A saveAs() FileSaver implementation.
* 2013-10-21 * 2013-12-27
* *
* By Eli Grey, http://eligrey.com * By Eli Grey, http://eligrey.com
* License: X11/MIT * License: X11/MIT
@@ -14,7 +14,7 @@
/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ /*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */
var saveAs = saveAs var saveAs = saveAs
|| (typeof navigator !== 'undefined' && navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator)) || (typeof navigator !== "undefined" && navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator))
|| (function(view) { || (function(view) {
"use strict"; "use strict";
var var
@@ -224,9 +224,13 @@ var saveAs = saveAs
view.addEventListener("unload", process_deletion_queue, false); view.addEventListener("unload", process_deletion_queue, false);
return saveAs; return saveAs;
}(this.self || this.window || this.content)); }(
typeof self !== "undefined" && self
|| typeof window !== "undefined" && window
|| this.content
));
// `self` is undefined in Firefox for Android content script context // `self` is undefined in Firefox for Android content script context
// while `this` is nsIContentFrameMessageManager // while `this` is nsIContentFrameMessageManager
// with an attribute `content` that corresponds to the window // with an attribute `content` that corresponds to the window
if (typeof module !== 'undefined') module.exports = saveAs; if (typeof module !== "undefined") module.exports = saveAs;