mirror of
https://github.com/lancedikson/bowser
synced 2026-03-02 03:40:27 +00:00
graded supported getting set correctly. bump package
This commit is contained in:
@@ -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;
|
||||
@@ -83,4 +89,4 @@
|
||||
(module.exports.browser = bowser) :
|
||||
(context.bowser = bowser);
|
||||
|
||||
}(this);
|
||||
}(this);
|
||||
|
||||
Reference in New Issue
Block a user