mirror of
https://github.com/lancedikson/bowser
synced 2024-10-27 20:34:22 +00:00
add ipad
and mobile
to chrome devices
This commit is contained in:
parent
9c3d5b9ed8
commit
4bba352a16
@ -36,6 +36,7 @@
|
|||||||
, seamonkey = /seamonkey\//i.test(ua)
|
, seamonkey = /seamonkey\//i.test(ua)
|
||||||
, webkitVersion = /version\/(\d+(\.\d+)?)/i
|
, webkitVersion = /version\/(\d+(\.\d+)?)/i
|
||||||
, firefoxVersion = /firefox\/(\d+(\.\d+)?)/i
|
, firefoxVersion = /firefox\/(\d+(\.\d+)?)/i
|
||||||
|
, mobile = /mobile/i.test(ua)
|
||||||
, o
|
, o
|
||||||
|
|
||||||
function detect() {
|
function detect() {
|
||||||
@ -55,6 +56,10 @@
|
|||||||
, webkit: t
|
, webkit: t
|
||||||
, chrome: t
|
, chrome: t
|
||||||
, version: ua.match(/(?:chrome|crios)\/(\d+(\.\d+)?)/i)[1]
|
, version: ua.match(/(?:chrome|crios)\/(\d+(\.\d+)?)/i)[1]
|
||||||
|
, ipad: ipad
|
||||||
|
, iphone: iphone
|
||||||
|
, ios: !!ua.match(/crios/i)
|
||||||
|
, mobile: mobile
|
||||||
}
|
}
|
||||||
if (phantom) return {
|
if (phantom) return {
|
||||||
name: 'PhantomJS'
|
name: 'PhantomJS'
|
||||||
@ -80,7 +85,7 @@
|
|||||||
o = {
|
o = {
|
||||||
name : iphone ? 'iPhone' : 'iPad'
|
name : iphone ? 'iPhone' : 'iPad'
|
||||||
, webkit: t
|
, webkit: t
|
||||||
, mobile: t
|
, mobile: iphone
|
||||||
, ios: t
|
, ios: t
|
||||||
, iphone: iphone
|
, iphone: iphone
|
||||||
, ipad: ipad
|
, ipad: ipad
|
||||||
@ -129,17 +134,17 @@
|
|||||||
|
|
||||||
// Graded Browser Support
|
// Graded Browser Support
|
||||||
// http://developer.yahoo.com/yui/articles/gbs
|
// http://developer.yahoo.com/yui/articles/gbs
|
||||||
if ((bowser.msie && bowser.version >= 8) ||
|
if ((bowser.msie && bowser.version >= 9) ||
|
||||||
(bowser.chrome && bowser.version >= 10) ||
|
(bowser.chrome && bowser.version >= 20) ||
|
||||||
(bowser.firefox && bowser.version >= 4.0) ||
|
(bowser.firefox && bowser.version >= 10.0) ||
|
||||||
(bowser.safari && bowser.version >= 5) ||
|
(bowser.safari && bowser.version >= 5) ||
|
||||||
(bowser.opera && bowser.version >= 10.0)) {
|
(bowser.opera && bowser.version >= 10.0)) {
|
||||||
bowser.a = t;
|
bowser.a = t;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if ((bowser.msie && bowser.version < 8) ||
|
else if ((bowser.msie && bowser.version < 9) ||
|
||||||
(bowser.chrome && bowser.version < 10) ||
|
(bowser.chrome && bowser.version < 20) ||
|
||||||
(bowser.firefox && bowser.version < 4.0) ||
|
(bowser.firefox && bowser.version < 10.0) ||
|
||||||
(bowser.safari && bowser.version < 5) ||
|
(bowser.safari && bowser.version < 5) ||
|
||||||
(bowser.opera && bowser.version < 10.0)) {
|
(bowser.opera && bowser.version < 10.0)) {
|
||||||
bowser.c = t
|
bowser.c = t
|
||||||
|
Loading…
Reference in New Issue
Block a user