You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lancedikson_bowser/bowser.min.js

6 lines
1.9 KiB

/*!
* Bowser - a browser detector
* https://github.com/ded/bowser
* MIT License | (c) Dustin Diaz 2013
*/
!function(e,t){typeof module!="undefined"&&module.exports?module.exports.browser=t():typeof define=="function"?define(t):this[e]=t()}("bowser",function(){function b(){return n?{name:"Internet Explorer",msie:t,version:e.match(/(msie |rv:)(\d+(\.\d+)?)/i)[2]}:c?{name:"Opera",opera:t,version:e.match(v)?e.match(v)[1]:e.match(/opr\/(\d+(\.\d+)?)/i)[1]}:r?{name:"Chrome",webkit:t,chrome:t,version:e.match(/(?:chrome|crios)\/(\d+(\.\d+)?)/i)[1],ipad:o,iphone:s,ios:!!e.match(/crios/i),mobile:g}:i?{name:"PhantomJS",webkit:t,phantom:t,version:e.match(/phantomjs\/(\d+(\.\d+)+)/i)[1]}:u?{name:"TouchPad",webkit:t,touchpad:t,version:e.match(/touchpad\/(\d+(\.\d+)?)/i)[1]}:a?{name:"Amazon Silk",webkit:t,android:t,mobile:t,version:e.match(/silk\/(\d+(\.\d+)?)/i)[1]}:s||o?(y={name:s?"iPhone":"iPad",webkit:t,mobile:s,ios:t,iphone:s,ipad:o},v.test(e)&&(y.version=e.match(v)[1]),y):l?{name:"Android",webkit:t,android:t,mobile:t,version:(e.match(v)||e.match(m))[1]}:f?{name:"Safari",webkit:t,safari:t,version:e.match(v)[1]}:p?(y={name:"Gecko",gecko:t,mozilla:t,version:e.match(m)[1]},h&&(y.name="Firefox",y.firefox=t),y):d?{name:"SeaMonkey",seamonkey:t,version:e.match(/seamonkey\/(\d+(\.\d+)?)/i)[1]}:{}}var e=navigator.userAgent,t=!0,n=/(msie|trident)/i.test(e),r=/chrome|crios/i.test(e),i=/phantom/i.test(e),s=/iphone/i.test(e),o=/ipad/i.test(e),u=/touchpad/i.test(e),a=/silk/i.test(e),f=/safari/i.test(e)&&!r&&!i&&!a,l=/android/i.test(e),c=/opera/i.test(e)||/opr/i.test(e),h=/firefox/i.test(e),p=/gecko\//i.test(e),d=/seamonkey\//i.test(e),v=/version\/(\d+(\.\d+)?)/i,m=/firefox\/(\d+(\.\d+)?)/i,g=/mobile/i.test(e),y,w=b();return w.msie&&w.version>=9||w.chrome&&w.version>=20||w.firefox&&w.version>=10||w.safari&&w.version>=5||w.opera&&w.version>=10?w.a=t:w.msie&&w.version<9||w.chrome&&w.version<20||w.firefox&&w.version<10||w.safari&&w.version<5||w.opera&&w.version<10?w.c=t:w.x=t,w})