mirror of
https://github.com/lancedikson/bowser
synced 2024-10-27 20:34:22 +00:00
Added Chrome for iOS
This commit is contained in:
parent
5884b16874
commit
0a13523041
@ -27,7 +27,7 @@
|
|||||||
var ua = navigator.userAgent
|
var ua = navigator.userAgent
|
||||||
, t = true
|
, t = true
|
||||||
, ie = /(msie|trident)/i.test(ua)
|
, ie = /(msie|trident)/i.test(ua)
|
||||||
, chrome = /chrome/i.test(ua)
|
, chrome = /chrome|crios/i.test(ua)
|
||||||
, phantom = /phantom/i.test(ua)
|
, phantom = /phantom/i.test(ua)
|
||||||
, safari = /safari/i.test(ua) && !chrome && !phantom
|
, safari = /safari/i.test(ua) && !chrome && !phantom
|
||||||
, iphone = /iphone/i.test(ua)
|
, iphone = /iphone/i.test(ua)
|
||||||
@ -58,7 +58,7 @@
|
|||||||
name: 'Chrome'
|
name: 'Chrome'
|
||||||
, webkit: t
|
, webkit: t
|
||||||
, chrome: t
|
, chrome: t
|
||||||
, version: ua.match(/chrome\/(\d+(\.\d+)?)/i)[1]
|
, version: ua.match(/(?:chrome|crios)\/(\d+(\.\d+)?)/i)[1]
|
||||||
}
|
}
|
||||||
if (phantom) return {
|
if (phantom) return {
|
||||||
name: 'PhantomJS'
|
name: 'PhantomJS'
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
var ua = navigator.userAgent
|
var ua = navigator.userAgent
|
||||||
, t = true
|
, t = true
|
||||||
, ie = /(msie|trident)/i.test(ua)
|
, ie = /(msie|trident)/i.test(ua)
|
||||||
, chrome = /chrome/i.test(ua)
|
, chrome = /chrome|crios/i.test(ua)
|
||||||
, phantom = /phantom/i.test(ua)
|
, phantom = /phantom/i.test(ua)
|
||||||
, safari = /safari/i.test(ua) && !chrome && !phantom
|
, safari = /safari/i.test(ua) && !chrome && !phantom
|
||||||
, iphone = /iphone/i.test(ua)
|
, iphone = /iphone/i.test(ua)
|
||||||
@ -52,7 +52,7 @@
|
|||||||
name: 'Chrome'
|
name: 'Chrome'
|
||||||
, webkit: t
|
, webkit: t
|
||||||
, chrome: t
|
, chrome: t
|
||||||
, version: ua.match(/chrome\/(\d+(\.\d+)?)/i)[1]
|
, version: ua.match(/(?:chrome|crios)\/(\d+(\.\d+)?)/i)[1]
|
||||||
}
|
}
|
||||||
if (phantom) return {
|
if (phantom) return {
|
||||||
name: 'PhantomJS'
|
name: 'PhantomJS'
|
||||||
|
Loading…
Reference in New Issue
Block a user