2012-01-24 09:58:00 +00:00
|
|
|
!function(a,b){typeof define=="function"?define(b):typeof module!="undefined"&&module.exports?module.exports.browser=b():this[a]=b()}("bowser",function(){function o(){if(c)return{msie:b,version:a.match(/msie (\d+(\.\d+)?);/i)[1]};if(d)return{webkit:b,chrome:b,version:a.match(/chrome\/(\d+(\.\d+)?)/i)[1]};if(f||g)return n={webkit:b,mobile:b,ios:b,iphone:f,ipad:g},m.test(a)&&(n.version=a.match(m)[1]),n;if(h)return{webkit:b,android:b,mobile:b,version:a.match(m)[1]};if(e)return{webkit:b,safari:b,version:a.match(m)[1]};if(i)return{opera:b,version:a.match(m)[1]};if(k)return n={gecko:b,mozilla:b,version:a.match(/firefox\/(\d+(\.\d+)?)/i)[1]},j&&(n.firefox=b),n;if(l)return{seamonkey:b,version:a.match(/seamonkey\/(\d+(\.\d+)?)/i)[1]}}var a=navigator.userAgent,b=!0,c=/msie/i.test(a),d=/chrome/i.test(a),e=/safari/i.test(a)&&!d,f=/iphone/i.test(a),g=/ipad/i.test(a),h=/android/i.test(a),i=/opera/i.test(a),j=/firefox/i.test(a),k=/gecko\//i.test(a),l=/seamonkey\//i.test(a),m=/version\/(\d+(\.\d+)?)/i,n,p=o();return p.msie&&p.version>=6||p.chrome&&p.version>=10||p.firefox&&p.version>=4||p.safari&&p.version>=5||p.opera&&p.version>=10?p.a=b:p.msie&&p.version<6||p.chrome&&p.version<10||p.firefox&&p.version<4||p.safari&&p.version<5||p.opera&&p.version<10?p.c=b:p.x=b,p})
|