mirror of
https://github.com/Mibew/i18n.git
synced 2025-01-24 06:10:28 +03:00
2 lines
470 B
JavaScript
2 lines
470 B
JavaScript
var myAgent="",myVer=0,myRealAgent="";function detectAgent(){for(var a=["opera","msie","safari","firefox","netscape","mozilla"],b=navigator.userAgent.toLowerCase(),c=0;c<a.length;c++){var d=a[c];if(b.indexOf(d)!=-1){myAgent=d;if(!window.RegExp)break;RegExp(d+"[ /]?([0-9]+(.[0-9]+)?)").exec(b)!=null&&(myVer=parseFloat(RegExp.$1));break}}myRealAgent=myAgent;navigator.product=="Gecko"&&(myAgent="moz")}detectAgent();function getEl(a){return document.getElementById(a)};
|