mirror of
https://github.com/lancedikson/bowser
synced 2024-10-27 20:34:22 +00:00
Added HP Touchpad support
This commit is contained in:
parent
9236d6fe0f
commit
9e1a11c052
2
bowser.min.js
vendored
2
bowser.min.js
vendored
@ -2,5 +2,5 @@
|
||||
* Bowser - a browser detector
|
||||
* https://github.com/ded/bowser
|
||||
* MIT License | (c) Dustin Diaz 2011
|
||||
*/
|
||||
*/
|
||||
!function(a,b){if(typeof define=="function"){define(b)}else{if(typeof module!="undefined"&&module.exports){module.exports.browser=b()}else{this[a]=b()}}}("bowser",function(){var d=navigator.userAgent,r=true,b=/msie/i.test(d),l=/chrome/i.test(d),c=/safari/i.test(d)&&!l,p=/iphone/i.test(d),q=/ipad/i.test(d),n=/touchpad/i.test(d),i=/android/i.test(d),j=/opera/i.test(d),m=/firefox/i.test(d),h=/gecko\//i.test(d),f=/seamonkey\//i.test(d),a=/version\/(\d+(\.\d+)?)/i,g;function e(){if(b){return{msie:r,version:d.match(/msie (\d+(\.\d+)?);/i)[1]}}if(l){return{webkit:r,chrome:r,version:d.match(/chrome\/(\d+(\.\d+)?)/i)[1]}}if(n){return{webkit:r,touchpad:r,version:d.match(/touchpad\/(\d+(\.\d+)?)/i)[1]}}if(p||q){g={webkit:r,mobile:r,ios:r,iphone:p,ipad:q};if(a.test(d)){g.version=d.match(a)[1]}return g}if(i){return{webkit:r,android:r,mobile:r,version:d.match(a)[1]}}if(c){return{webkit:r,safari:r,version:d.match(a)[1]}}if(j){return{opera:r,version:d.match(a)[1]}}if(h){g={gecko:r,mozilla:r,version:d.match(/firefox\/(\d+(\.\d+)?)/i)[1]};if(m){g.firefox=r}return g}if(f){return{seamonkey:r,version:d.match(/seamonkey\/(\d+(\.\d+)?)/i)[1]}}}var k=e();if((k.msie&&k.version>=6)||(k.chrome&&k.version>=10)||(k.firefox&&k.version>=4)||(k.safari&&k.version>=5)||(k.opera&&k.version>=10)){k.a=r}else{if((k.msie&&k.version<6)||(k.chrome&&k.version<10)||(k.firefox&&k.version<4)||(k.safari&&k.version<5)||(k.opera&&k.version<10)){k.c=r}else{k.x=r}}return k});
|
Loading…
Reference in New Issue
Block a user