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

upgrade support

This commit is contained in:
Dustin Diaz 2013-08-16 13:03:14 -07:00
parent 541fab750e
commit 20826d1ea5
4 changed files with 9 additions and 8 deletions

View File

@ -1,8 +1,9 @@
/*!
* Bowser - a browser detector
* https://github.com/ded/bowser
* MIT License | (c) Dustin Diaz 2011
* MIT License | (c) Dustin Diaz 2013
*/
!function (name, definition) {
if (typeof define == 'function') define(definition)
else if (typeof module != 'undefined' && module.exports) module.exports['browser'] = definition()
@ -111,7 +112,7 @@
// Graded Browser Support
// http://developer.yahoo.com/yui/articles/gbs
if ((bowser.msie && bowser.version >= 7) ||
if ((bowser.msie && bowser.version >= 8) ||
(bowser.chrome && bowser.version >= 10) ||
(bowser.firefox && bowser.version >= 4.0) ||
(bowser.safari && bowser.version >= 5) ||
@ -119,7 +120,7 @@
bowser.a = t;
}
else if ((bowser.msie && bowser.version < 7) ||
else if ((bowser.msie && bowser.version < 8) ||
(bowser.chrome && bowser.version < 10) ||
(bowser.firefox && bowser.version < 4.0) ||
(bowser.safari && bowser.version < 5) ||

4
bowser.min.js vendored
View File

@ -1,6 +1,6 @@
/*!
* Bowser - a browser detector
* https://github.com/ded/bowser
* MIT License | (c) Dustin Diaz 2011
* MIT License | (c) Dustin Diaz 2013
*/
!function(e,t){typeof define=="function"?define(t):typeof module!="undefined"&&module.exports?module.exports.browser=t():this[e]=t()}("bowser",function(){function g(){return n?{msie:t,version:e.match(/(msie |rv:)(\d+(\.\d+)?)/i)[2]}:l?{opera:t,version:e.match(d)?e.match(d)[1]:e.match(/opr\/(\d+(\.\d+)?)/i)}:r?{webkit:t,chrome:t,version:e.match(/chrome\/(\d+(\.\d+)?)/i)[1]}:i?{webkit:t,phantom:t,version:e.match(/phantomjs\/(\d+(\.\d+)+)/i)[1]}:a?{webkit:t,touchpad:t,version:e.match(/touchpad\/(\d+(\.\d+)?)/i)[1]}:o||u?(m={webkit:t,mobile:t,ios:t,iphone:o,ipad:u},d.test(e)&&(m.version=e.match(d)[1]),m):f?{webkit:t,android:t,mobile:t,version:(e.match(d)||e.match(v))[1]}:s?{webkit:t,safari:t,version:e.match(d)[1]}:h?(m={gecko:t,mozilla:t,version:e.match(v)[1]},c&&(m.firefox=t),m):p?{seamonkey:t,version:e.match(/seamonkey\/(\d+(\.\d+)?)/i)[1]}:{}}var e=navigator.userAgent,t=!0,n=/(msie|trident)/i.test(e),r=/chrome/i.test(e),i=/phantom/i.test(e),s=/safari/i.test(e)&&!r&&!i,o=/iphone/i.test(e),u=/ipad/i.test(e),a=/touchpad/i.test(e),f=/android/i.test(e),l=/opera/i.test(e)||/opr/i.test(e),c=/firefox/i.test(e),h=/gecko\//i.test(e),p=/seamonkey\//i.test(e),d=/version\/(\d+(\.\d+)?)/i,v=/firefox\/(\d+(\.\d+)?)/i,m,y=g();return y.msie&&y.version>=7||y.chrome&&y.version>=10||y.firefox&&y.version>=4||y.safari&&y.version>=5||y.opera&&y.version>=10?y.a=t:y.msie&&y.version<7||y.chrome&&y.version<10||y.firefox&&y.version<4||y.safari&&y.version<5||y.opera&&y.version<10?y.c=t:y.x=t,y})
!function(e,t){typeof define=="function"?define(t):typeof module!="undefined"&&module.exports?module.exports.browser=t():this[e]=t()}("bowser",function(){function g(){return n?{msie:t,version:e.match(/(msie |rv:)(\d+(\.\d+)?)/i)[2]}:l?{opera:t,version:e.match(d)?e.match(d)[1]:e.match(/opr\/(\d+(\.\d+)?)/i)}:r?{webkit:t,chrome:t,version:e.match(/chrome\/(\d+(\.\d+)?)/i)[1]}:i?{webkit:t,phantom:t,version:e.match(/phantomjs\/(\d+(\.\d+)+)/i)[1]}:a?{webkit:t,touchpad:t,version:e.match(/touchpad\/(\d+(\.\d+)?)/i)[1]}:o||u?(m={webkit:t,mobile:t,ios:t,iphone:o,ipad:u},d.test(e)&&(m.version=e.match(d)[1]),m):f?{webkit:t,android:t,mobile:t,version:(e.match(d)||e.match(v))[1]}:s?{webkit:t,safari:t,version:e.match(d)[1]}:h?(m={gecko:t,mozilla:t,version:e.match(v)[1]},c&&(m.firefox=t),m):p?{seamonkey:t,version:e.match(/seamonkey\/(\d+(\.\d+)?)/i)[1]}:{}}var e=navigator.userAgent,t=!0,n=/(msie|trident)/i.test(e),r=/chrome/i.test(e),i=/phantom/i.test(e),s=/safari/i.test(e)&&!r&&!i,o=/iphone/i.test(e),u=/ipad/i.test(e),a=/touchpad/i.test(e),f=/android/i.test(e),l=/opera/i.test(e)||/opr/i.test(e),c=/firefox/i.test(e),h=/gecko\//i.test(e),p=/seamonkey\//i.test(e),d=/version\/(\d+(\.\d+)?)/i,v=/firefox\/(\d+(\.\d+)?)/i,m,y=g();return y.msie&&y.version>=8||y.chrome&&y.version>=10||y.firefox&&y.version>=4||y.safari&&y.version>=5||y.opera&&y.version>=10?y.a=t:y.msie&&y.version<8||y.chrome&&y.version<10||y.firefox&&y.version<4||y.safari&&y.version<5||y.opera&&y.version<10?y.c=t:y.x=t,y})

View File

@ -2,7 +2,7 @@
"name": "bowser"
, "description": "a browser detector"
, "keywords": ["ender", "browser", "sniff", "detection"]
, "version": "0.3.0"
, "version": "0.3.1"
, "homepage": "https://github.com/ded/bowser"
, "author": "Dustin Diaz <dustin@dustindiaz.com> (http://dustindiaz.com)"
, "main": "./bowser.js"

View File

@ -106,7 +106,7 @@
// Graded Browser Support
// http://developer.yahoo.com/yui/articles/gbs
if ((bowser.msie && bowser.version >= 7) ||
if ((bowser.msie && bowser.version >= 8) ||
(bowser.chrome && bowser.version >= 10) ||
(bowser.firefox && bowser.version >= 4.0) ||
(bowser.safari && bowser.version >= 5) ||
@ -114,7 +114,7 @@
bowser.a = t;
}
else if ((bowser.msie && bowser.version < 7) ||
else if ((bowser.msie && bowser.version < 8) ||
(bowser.chrome && bowser.version < 10) ||
(bowser.firefox && bowser.version < 4.0) ||
(bowser.safari && bowser.version < 5) ||