Skip to content

Commit

Permalink
add ipad and mobile to chrome devices
Browse files Browse the repository at this point in the history
  • Loading branch information
ded committed Feb 19, 2014
1 parent 9c3d5b9 commit 4bba352
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/bowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
, seamonkey = /seamonkey\//i.test(ua)
, webkitVersion = /version\/(\d+(\.\d+)?)/i
, firefoxVersion = /firefox\/(\d+(\.\d+)?)/i
, mobile = /mobile/i.test(ua)
, o

function detect() {
Expand All @@ -55,6 +56,10 @@
, webkit: t
, chrome: t
, version: ua.match(/(?:chrome|crios)\/(\d+(\.\d+)?)/i)[1]
, ipad: ipad
, iphone: iphone
, ios: !!ua.match(/crios/i)
, mobile: mobile
}
if (phantom) return {
name: 'PhantomJS'
Expand All @@ -80,7 +85,7 @@
o = {
name : iphone ? 'iPhone' : 'iPad'
, webkit: t
, mobile: t
, mobile: iphone
, ios: t
, iphone: iphone
, ipad: ipad
Expand Down Expand Up @@ -129,17 +134,17 @@

// Graded Browser Support
// http://developer.yahoo.com/yui/articles/gbs
if ((bowser.msie && bowser.version >= 8) ||
(bowser.chrome && bowser.version >= 10) ||
(bowser.firefox && bowser.version >= 4.0) ||
if ((bowser.msie && bowser.version >= 9) ||
(bowser.chrome && bowser.version >= 20) ||
(bowser.firefox && bowser.version >= 10.0) ||
(bowser.safari && bowser.version >= 5) ||
(bowser.opera && bowser.version >= 10.0)) {
bowser.a = t;
}

else if ((bowser.msie && bowser.version < 8) ||
(bowser.chrome && bowser.version < 10) ||
(bowser.firefox && bowser.version < 4.0) ||
else if ((bowser.msie && bowser.version < 9) ||
(bowser.chrome && bowser.version < 20) ||
(bowser.firefox && bowser.version < 10.0) ||
(bowser.safari && bowser.version < 5) ||
(bowser.opera && bowser.version < 10.0)) {
bowser.c = t
Expand Down

0 comments on commit 4bba352

Please sign in to comment.