-
Notifications
You must be signed in to change notification settings - Fork 1
/
ua.min.js
1 lines (1 loc) · 1.31 KB
/
ua.min.js
1
window.ua=function(e,o){function t(e,o){for(var t=arguments,a=t.length-1,r=t[a],s=r[0];s!==!0&&!RegExp(s).test(e)&&a>0;r=t[--a],s=r[0]);(o.slice||o.call(this,s,r))&&(this[o]=void 0===r[1]?s:r[1])}e="string"==typeof e?e.toLowerCase():"",o===!0?o=exports:o||(o={});var a="firefox",r="mac",s="chrome",i="android",l="wrapper",n=".+mobile",p="webkit",v="playstation",c="xbox",m="linux",f="crkey",b="cast",d="tablet",g="windows",u="phone",x="firetv",h="rikstv",w="facebook",k="edge",y="version",z="samsung";return t.call(o,e,function(t,a){o.browser=a[2]||t;var r=e.match(RegExp("((([\\/ ]"+y+"|"+a[0]+"(?!.+"+y+"))[/ ])| rv:)([0-9]{1,4}\\.[0-9]{0,2})"));o[y]=r?Number(r[4]):0,o.prefix=a[1]},[!0,p],["\\("+g,"ms","ie"],["safari",p],[a,"Moz"],["opera","O"],["msie","ms","ie"],[w],[s+"|crios/",p,s],[k,p,k]),t.call(o,e,"platform",[!0,g],[m],["lg.{0,3}netcast","lg"],[a+n,a],[r+" os x",r],["iphone|ipod|ipad","ios"],[c],[v],[i],[g],[f,b],["smart-tv;|;"+z+";smarttv",z],[h]),t.call(o,e,"device",[!0,"desktop"],[g+".+touch|ipad|"+i,d],[u+"|phone|("+i+n+")|("+a+n+")|"+g+" phone|iemobile",u],[c+"|"+v,"console"],["tv|smarttv|googletv|appletv|hbbtv|pov_tv|netcast.tv|webos.+large","tv"],[f,b],[d+"|amazon-fireos|nexus (?=[^1-6])\\d{1,2}",d],["aft[bsm]",x],[h]),t.call(o,e,"webview",[!0,!1],["crosswalk"],["vigour-"+l,l],["cordova"],["ploy-native"]),o};