1
0
mirror of https://github.com/lancedikson/bowser synced 2024-09-28 22:30:44 +00:00
lancedikson_bowser/bowser.min.js
Dustin Diaz a1505c4fb0 boosh
2011-04-27 15:14:35 -07:00

7 lines
740 B
JavaScript

/*!
* 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);typeof module!="undefined"&&module.exports?module.exports.browser=i:a.bowser=i}(this)