_getAndroid Regular Expression error ! Does not support Android 10. X
SkyLandBeast opened this issue · 1 comments
SkyLandBeast commented
// android 2.x doesn't support Data-URI spec
function _getAndroid() {
var android = false;
var sAgent = navigator.userAgent;
if (/android/i.test(sAgent)) { // android
android = true;
// android 10.X Regular Expression error
var aMat = sAgent.toString().match(/android ([0-9]\.[0-9])/i);
if (aMat && aMat[1]) {
android = parseFloat(aMat[1]);
}
}
return android;
}
SkyLandBeast commented
var aMat = sAgent.toString().match(/([aA])ndroid ([0-9.]*)/i);