Permalink
Browse files

Fleshed out isiOS based on the browser user-agent

  • Loading branch information...
1 parent aa5b89b commit 7303c0e4295fe71c8782ddc95a8f12612719caca @shazron shazron committed Aug 22, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 js/hydra.js
View
@@ -33,8 +33,9 @@
}
function openXHR(url, options, xhr) {
- var isiOS = true; // TODO: differentiate, we need this function because iOS can only handle basic auth credentials in the URL itself
-
+ // differentiate, we need this function because iOS can only handle basic auth credentials in the URL itself
+ var isiOS = (navigator.userAgent.match(/iPhone/i) != null) || (navigator.userAgent.match(/iPad/i) != null);
+
var async = (options && options.async ? options.async : true);
var username = (options && options.username ? options.username : null );
var password = (options && options.password ? options.password : null );

0 comments on commit 7303c0e

Please sign in to comment.