14 lines
1.3 KiB
JavaScript
14 lines
1.3 KiB
JavaScript
|
/*!
|
||
|
* jQuery Browser Plugin 0.0.5
|
||
|
* https://github.com/gabceb/jquery-browser-plugin
|
||
|
*
|
||
|
* Original jquery-browser code Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
|
||
|
* http://jquery.org/license
|
||
|
*
|
||
|
* Modifications Copyright 2013 Gabriel Cebrian
|
||
|
* https://github.com/gabceb
|
||
|
*
|
||
|
* Released under the MIT license
|
||
|
*
|
||
|
* Date: 14-11-2013
|
||
|
*/!function(a,b){"use strict";var c,d;if(a.uaMatch=function(a){a=a.toLowerCase();var b=/(opr)[\/]([\w.]+)/.exec(a)||/(chrome)[ \/]([\w.]+)/.exec(a)||/(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[],c=/(ipad)/.exec(a)||/(iphone)/.exec(a)||/(android)/.exec(a)||/(windows phone)/.exec(a)||/(win)/.exec(a)||/(mac)/.exec(a)||/(linux)/.exec(a)||[];return{browser:b[3]||b[1]||"",version:b[2]||"0",platform:c[0]||""}},c=a.uaMatch(b.navigator.userAgent),d={},c.browser&&(d[c.browser]=!0,d.version=c.version,d.versionNumber=parseFloat(c.version,10)),c.platform&&(d[c.platform]=!0),(d.chrome||d.opr||d.safari)&&(d.webkit=!0),d.rv){var e="msie";c.browser=e,d[e]=!0}if(d.opr){var f="opera";c.browser=f,d[f]=!0}d.name=c.browser,d.platform=c.platform,a.browser=d}(jQuery,window);
|