Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mobile Chrome fails to download unsafe files #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions src/Scripts/jquery.fileDownload.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,18 @@ $.extend({
var userAgent = (navigator.userAgent || navigator.vendor || window.opera).toLowerCase();

var isIos; //has full support of features in iOS 4.0+, uses a new window to accomplish this.
var isChrome; //mobile chrome does not need to be treated like the stock android browser
var isAndroid; //has full support of GET features in 4.0+ by using a new window. Non-GET is completely unsupported by the browser. See above for specifying a message.
var isOtherMobileBrowser; //there is no way to reliably guess here so all other mobile devices will GET and POST to the current window.

if (/ip(ad|hone|od)/.test(userAgent)) {

isIos = true;

} else if (userAgent.indexOf('chrome') !== -1) {

isChrome = true;

} else if (userAgent.indexOf('android') !== -1) {

isAndroid = true;
Expand Down