]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Bump FileSaver.js to v2015-01-04.
authorXhmikosR <xhmikosr@gmail.com>
Fri, 30 Jan 2015 13:22:56 +0000 (15:22 +0200)
committerXhmikosR <xhmikosr@gmail.com>
Fri, 30 Jan 2015 13:22:56 +0000 (15:22 +0200)
docs/assets/js/vendor/FileSaver.js

index 1095873014f48647bea070c6ce8287c1abac5612..20ebeb21dd547f631df5eda76cc5412d6464f797 100644 (file)
@@ -1,6 +1,6 @@
 /* FileSaver.js
  * A saveAs() FileSaver implementation.
- * 2014-08-29
+ * 2015-01-04
  *
  * By Eli Grey, http://eligrey.com
  * License: X11/MIT
@@ -49,9 +49,10 @@ var saveAs = saveAs
                }
                , force_saveable_type = "application/octet-stream"
                , fs_min_size = 0
-               // See https://code.google.com/p/chromium/issues/detail?id=375297#c7 for
-               // the reasoning behind the timeout and revocation flow
-               , arbitrary_revoke_timeout = 10
+               // See https://code.google.com/p/chromium/issues/detail?id=375297#c7 and
+               // https://github.com/eligrey/FileSaver.js/commit/485930a#commitcomment-8768047
+               // for the reasoning behind the timeout and revocation flow
+               , arbitrary_revoke_timeout = 500 // in ms
                , revoke = function(file) {
                        var revoker = function() {
                                if (typeof file === "string") { // file is an object URL
@@ -234,8 +235,8 @@ var saveAs = saveAs
 // while `this` is nsIContentFrameMessageManager
 // with an attribute `content` that corresponds to the window
 
-if (typeof module !== "undefined" && module !== null) {
-  module.exports = saveAs;
+if (typeof module !== "undefined" && module.exports) {
+  module.exports.saveAs = saveAs;
 } else if ((typeof define !== "undefined" && define !== null) && (define.amd != null)) {
   define([], function() {
     return saveAs;