iPhone not detected as running on iOS
jdalton opened this issue · 2 comments
jdalton commented
You have
navigator.userAgent.match( /ipod/i ) || navigator.userAgent.match( /ipad/i )
You should tighten up that code and use 1 regexp, something like:
var ua = navigator.userAgent;
if ( /iP[ao]d|iPhone/.test(ua) ) {
// ...
}
mrdoob commented
Changed too. Thanks!
mrdoob commented
Also changed it to use regexp.test(string)
. Thanks for the tip :)