appVersions: function () {
var a = navigator.userAgent,
b = navigator.appVersion;
return {
trident: a.indexOf("Trident") > -1,
presto: a.indexOf("Presto") > -1,
webKit: a.indexOf("AppleWebKit") > -1,
gecko: a.indexOf("Gecko") > -1 && a.indexOf("KHTML") == -1,
mobile: !!a.match(/AppleWebKit.*Mobile.*/),
ios: !!a.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
android: a.indexOf("Android") > -1 || a.indexOf("Adr") > -1,
iPhone: a.indexOf("iPhone") > -1,
iPad: a.indexOf("iPad") > -1,
webApp: a.indexOf("Safari") == -1,
weixin: a.indexOf("MicroMessenger") > -1,
qq: a.match(/\sQQ/i) == " qq",
gtIos9: Boolean(a.match(/OS [9|10]_\d[_\d]* like Mac OS X/i))
}
},
网友评论