mirror of
https://github.com/lancedikson/bowser
synced 2024-10-27 20:34:22 +00:00
graded supported getting set correctly. bump package
This commit is contained in:
parent
22be8a6caa
commit
6bb347a994
16
bowser.js
16
bowser.js
@ -1,3 +1,9 @@
|
||||
/*!
|
||||
* Bowser - a browser detector
|
||||
* copyright Dustin Diaz 2011
|
||||
* https://github.com/ded/bowser
|
||||
* MIT License
|
||||
*/
|
||||
/*!
|
||||
* Bowser - a browser detector
|
||||
* copyright Dustin Diaz 2011
|
||||
@ -27,33 +33,33 @@
|
||||
if (ie) {
|
||||
return {
|
||||
msie: 1,
|
||||
version: ua.match(/msie ([\d\.]+);/i)[1]
|
||||
version: ua.match(/msie (\d+(\.\d+)?);/i)[1]
|
||||
};
|
||||
}
|
||||
if (chrome) {
|
||||
return {
|
||||
webkit: 1,
|
||||
chrome: 1,
|
||||
version: ua.match(/chrome\/([\d\.]+)/i)[1]
|
||||
version: ua.match(/chrome\/(\d+(\.\d+)?)/i)[1]
|
||||
};
|
||||
}
|
||||
if (safari) {
|
||||
return {
|
||||
webkit: 1,
|
||||
safari: 1,
|
||||
version: ua.match(/version\/([\d\.]+)/i)[1]
|
||||
version: ua.match(/version\/(\d+(\.\d+)?)/i)[1]
|
||||
};
|
||||
}
|
||||
if (opera) {
|
||||
return {
|
||||
opera: 1,
|
||||
version: ua.match(/version\/([\d\.]+)/i)[1]
|
||||
version: ua.match(/version\/(\d+(\.\d+)?)/i)[1]
|
||||
};
|
||||
}
|
||||
if (gecko) {
|
||||
var o = {
|
||||
gecko: 1,
|
||||
version: ua.match(/firefox\/([\d\.]+)/i)[1]
|
||||
version: ua.match(/firefox\/(\d+(\.\d+)?)/i)[1]
|
||||
};
|
||||
if (firefox) {
|
||||
o.firefox = 1;
|
||||
|
7
bowser.min.js
vendored
7
bowser.min.js
vendored
@ -1,7 +1,12 @@
|
||||
/*!
|
||||
* Bowser - a browser detector
|
||||
* copyright Dustin Diaz 2011
|
||||
* https://github.com/ded/bowser
|
||||
* MIT License
|
||||
*//*!
|
||||
* Bowser - a browser detector
|
||||
* copyright Dustin Diaz 2011
|
||||
* https://github.com/ded/bowser
|
||||
* MIT License
|
||||
*/
|
||||
!function(a){function i(){if(c)return{msie:1,version:b.match(/msie ([\d\.]+);/i)[1]};if(d)return{webkit:1,chrome:1,version:b.match(/chrome\/([\d\.]+)/i)[1]};if(e)return{webkit:1,safari:1,version:b.match(/version\/([\d\.]+)/i)[1]};if(f)return{opera:1,version:b.match(/version\/([\d\.]+)/i)[1]};if(h){var a={gecko:1,version:b.match(/firefox\/([\d\.]+)/i)[1]};g&&(a.firefox=1);return a}}var b=navigator.userAgent,c=/msie/i.test(b),d=/chrome/i.test(b),e=/safari/i.test(b)&&!d,f=/opera/i.test(b),g=/firefox/i.test(b),h=/gecko\//i.test(b),j=i();j.msie&&j.version>=6||j.chrome&&j.version>=8||j.firefox&&j.version>=3.6||j.safari&&j.version>=5||j.opera&&j.version>=9.5?j.a=!0:j.msie&&j.version<6||j.chrome&&j.version<8||j.firefox&&j.version<3.6||j.safari&&j.version<5||j.opera&&j.version<9.5?j.c=!0:j.x=!0,typeof module!="undefined"&&module.exports?module.exports.browser=j:a.bowser=j}(this)
|
||||
!function(a){function i(){if(c)return{msie:1,version:b.match(/msie (\d+(\.\d+)?);/i)[1]};if(d)return{webkit:1,chrome:1,version:b.match(/chrome\/(\d+(\.\d+)?)/i)[1]};if(e)return{webkit:1,safari:1,version:b.match(/version\/(\d+(\.\d+)?)/i)[1]};if(f)return{opera:1,version:b.match(/version\/(\d+(\.\d+)?)/i)[1]};if(h){var a={gecko:1,version:b.match(/firefox\/(\d+(\.\d+)?)/i)[1]};g&&(a.firefox=1);return a}}var b=navigator.userAgent,c=/msie/i.test(b),d=/chrome/i.test(b),e=/safari/i.test(b)&&!d,f=/opera/i.test(b),g=/firefox/i.test(b),h=/gecko\//i.test(b),j=i();j.msie&&j.version>=6||j.chrome&&j.version>=8||j.firefox&&j.version>=3.6||j.safari&&j.version>=5||j.opera&&j.version>=9.5?j.a=!0:j.msie&&j.version<6||j.chrome&&j.version<8||j.firefox&&j.version<3.6||j.safari&&j.version<5||j.opera&&j.version<9.5?j.c=!0:j.x=!0,typeof module!="undefined"&&module.exports?module.exports.browser=j:a.bowser=j}(this)
|
@ -2,7 +2,7 @@
|
||||
"name": "bowser",
|
||||
"description": "a browser detector",
|
||||
"keywords": ["ender", "browser", "sniff", "detection"],
|
||||
"version": "0.0.4",
|
||||
"version": "0.0.5",
|
||||
"homepage": "https://github.com/ded/bowser",
|
||||
"author": "Dustin Diaz <@ded>",
|
||||
"repository": {
|
||||
|
@ -1,3 +1,9 @@
|
||||
/*!
|
||||
* Bowser - a browser detector
|
||||
* copyright Dustin Diaz 2011
|
||||
* https://github.com/ded/bowser
|
||||
* MIT License
|
||||
*/
|
||||
!function (context) {
|
||||
/**
|
||||
* navigator.userAgent =>
|
||||
@ -21,33 +27,33 @@
|
||||
if (ie) {
|
||||
return {
|
||||
msie: 1,
|
||||
version: ua.match(/msie ([\d\.]+);/i)[1]
|
||||
version: ua.match(/msie (\d+(\.\d+)?);/i)[1]
|
||||
};
|
||||
}
|
||||
if (chrome) {
|
||||
return {
|
||||
webkit: 1,
|
||||
chrome: 1,
|
||||
version: ua.match(/chrome\/([\d\.]+)/i)[1]
|
||||
version: ua.match(/chrome\/(\d+(\.\d+)?)/i)[1]
|
||||
};
|
||||
}
|
||||
if (safari) {
|
||||
return {
|
||||
webkit: 1,
|
||||
safari: 1,
|
||||
version: ua.match(/version\/([\d\.]+)/i)[1]
|
||||
version: ua.match(/version\/(\d+(\.\d+)?)/i)[1]
|
||||
};
|
||||
}
|
||||
if (opera) {
|
||||
return {
|
||||
opera: 1,
|
||||
version: ua.match(/version\/([\d\.]+)/i)[1]
|
||||
version: ua.match(/version\/(\d+(\.\d+)?)/i)[1]
|
||||
};
|
||||
}
|
||||
if (gecko) {
|
||||
var o = {
|
||||
gecko: 1,
|
||||
version: ua.match(/firefox\/([\d\.]+)/i)[1]
|
||||
version: ua.match(/firefox\/(\d+(\.\d+)?)/i)[1]
|
||||
};
|
||||
if (firefox) {
|
||||
o.firefox = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user