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:
parent
22be8a6caa
commit
c3ccffcd2f
16
bowser.js
16
bowser.js
@ -26,37 +26,37 @@
|
||||
|
||||
if (ie) {
|
||||
return {
|
||||
msie: 1,
|
||||
msie: true,
|
||||
version: ua.match(/msie ([\d\.]+);/i)[1]
|
||||
};
|
||||
}
|
||||
if (chrome) {
|
||||
return {
|
||||
webkit: 1,
|
||||
chrome: 1,
|
||||
webkit: true,
|
||||
chrome: true,
|
||||
version: ua.match(/chrome\/([\d\.]+)/i)[1]
|
||||
};
|
||||
}
|
||||
if (safari) {
|
||||
return {
|
||||
webkit: 1,
|
||||
safari: 1,
|
||||
webkit: true,
|
||||
safari: true,
|
||||
version: ua.match(/version\/([\d\.]+)/i)[1]
|
||||
};
|
||||
}
|
||||
if (opera) {
|
||||
return {
|
||||
opera: 1,
|
||||
opera: true,
|
||||
version: ua.match(/version\/([\d\.]+)/i)[1]
|
||||
};
|
||||
}
|
||||
if (gecko) {
|
||||
var o = {
|
||||
gecko: 1,
|
||||
gecko: true,
|
||||
version: ua.match(/firefox\/([\d\.]+)/i)[1]
|
||||
};
|
||||
if (firefox) {
|
||||
o.firefox = 1;
|
||||
o.firefox = true;
|
||||
}
|
||||
return o;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user