mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-12 00:29:17 +05:00
54 lines
1.1 KiB
JavaScript
Executable File
54 lines
1.1 KiB
JavaScript
Executable File
var gbNav6=false;
|
|
var gbNav61=false;
|
|
var gbNav4=false;
|
|
var gbIE4=false;
|
|
var gbIE=false;
|
|
var gbIE5=false;
|
|
var gbIE55=false;
|
|
|
|
var gAgent=navigator.userAgent.toLowerCase();
|
|
var gbMac=(gAgent.indexOf("mac")!=-1);
|
|
var gbSunOS=(gAgent.indexOf("sunos")!=-1);
|
|
var gbOpera=(gAgent.indexOf("opera")!=-1);
|
|
|
|
var gVersion=navigator.appVersion.toLowerCase();
|
|
|
|
var gnVerMajor=parseInt(gVersion);
|
|
var gnVerMinor=parseFloat(gVersion);
|
|
|
|
gbIE=(navigator.appName.indexOf("Microsoft")!=-1);
|
|
if(gnVerMajor>=4)
|
|
{
|
|
if(navigator.appName=="Netscape")
|
|
{
|
|
gbNav4=true;
|
|
if(gnVerMajor>=5)
|
|
gbNav6=true;
|
|
}
|
|
gbIE4=(navigator.appName.indexOf("Microsoft")!=-1);
|
|
}
|
|
if(gbNav6)
|
|
{
|
|
document.gnPageWidth=innerWidth;
|
|
document.gnPageHeight=innerHeight;
|
|
var nPos=gAgent.indexOf("netscape");
|
|
if(nPos!=-1)
|
|
{
|
|
var nVersion=parseFloat(gAgent.substring(nPos+10));
|
|
if(nVersion>=6.1)
|
|
gbNav61=true;
|
|
}
|
|
}else if(gbIE4)
|
|
{
|
|
var nPos=gAgent.indexOf("msie");
|
|
if(nPos!=-1)
|
|
{
|
|
var nVersion=parseFloat(gAgent.substring(nPos+5));
|
|
if(nVersion>=5)
|
|
gbIE5=true;
|
|
if(nVersion>=5.5)
|
|
gbIE55=true;
|
|
}
|
|
}
|
|
|
|
var gbWhVer=true; |