1
0
mirror of https://github.com/lancedikson/bowser synced 2024-10-27 20:34:22 +00:00

separated os detection specific code from webkit-based browser detection

This commit is contained in:
BendingBender 2014-02-28 18:03:32 +01:00
parent 3fd9de187d
commit 8bcd3bc802

View File

@ -138,6 +138,11 @@
}
else result = {}
// set webkit flag for webkit-based browsers
if (/(apple)?webkit/i.test(ua)) {
result.webkit = t
}
// set OS flags for platforms that have multiple browsers
if (android || result.silk) {
result.android = t
@ -145,9 +150,6 @@
result[iosdevice] = t
result.ios = t
}
if (/applewebkit/i.test(ua)) {
result.webkit = t
}
// OS version extraction
var osVersion = '';