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

Changed all the "1" width true for evading coercion in testing fore example in cases like this

if(bowser.msie && bowser.version < 9){
    //some stuff here
}
This commit is contained in:
skill83 2011-05-18 03:24:52 -07:00
parent 22be8a6caa
commit c3ccffcd2f

View File

@ -26,37 +26,37 @@
if (ie) { if (ie) {
return { return {
msie: 1, msie: true,
version: ua.match(/msie ([\d\.]+);/i)[1] version: ua.match(/msie ([\d\.]+);/i)[1]
}; };
} }
if (chrome) { if (chrome) {
return { return {
webkit: 1, webkit: true,
chrome: 1, chrome: true,
version: ua.match(/chrome\/([\d\.]+)/i)[1] version: ua.match(/chrome\/([\d\.]+)/i)[1]
}; };
} }
if (safari) { if (safari) {
return { return {
webkit: 1, webkit: true,
safari: 1, safari: true,
version: ua.match(/version\/([\d\.]+)/i)[1] version: ua.match(/version\/([\d\.]+)/i)[1]
}; };
} }
if (opera) { if (opera) {
return { return {
opera: 1, opera: true,
version: ua.match(/version\/([\d\.]+)/i)[1] version: ua.match(/version\/([\d\.]+)/i)[1]
}; };
} }
if (gecko) { if (gecko) {
var o = { var o = {
gecko: 1, gecko: true,
version: ua.match(/firefox\/([\d\.]+)/i)[1] version: ua.match(/firefox\/([\d\.]+)/i)[1]
}; };
if (firefox) { if (firefox) {
o.firefox = 1; o.firefox = true;
} }
return o; return o;
} }