Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions dist/FileSaver.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@


var isMacOSWebView = /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent);
var isSamsungBrowser = /SamsungBrowser/.test(navigator.userAgent);
var saveAs = _global.saveAs || ( // probably in some web worker
typeof window !== 'object' || window !== _global ? function saveAs() {}
/* noop */
Expand Down Expand Up @@ -118,9 +119,14 @@
URL.revokeObjectURL(a.href);
}, 4E4); // 40s

setTimeout(function () {
if (isSamsungBrowser) {
// SamsungBrowser blocks by default "auto downloads" i.e. not initiated by user interaction (#660)
click(a);
}, 0);
} else {
setTimeout(function () {
click(a);
}, 0);
}
}
} // Use msSaveOrOpenBlob as a second approach
: 'msSaveOrOpenBlob' in navigator ? function saveAs(blob, name, opts) {
Expand Down
2 changes: 1 addition & 1 deletion dist/FileSaver.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading