зеркало из https://github.com/mozilla/pjs.git
fix getBrowserVersionNumber
This commit is contained in:
Родитель
24d298d762
Коммит
e5e4f3533c
|
@ -138,12 +138,12 @@ function getAcctSetupFilename( object )
|
||||||
|
|
||||||
function getBrowserVersionNumber()
|
function getBrowserVersionNumber()
|
||||||
{
|
{
|
||||||
var theAgent = navigator.userAgent;
|
var agent = navigator.userAgent;
|
||||||
var x = theAgent.indexOf( "/" );
|
var x = agent.indexOf( "/" );
|
||||||
var theVersion = "unknown";
|
var version = "unknown";
|
||||||
if ( x >= 0 )
|
if ( x >= 0 )
|
||||||
var theVersion = theAgent.substring( x + 1, theAgent.length );
|
version = agent.substring( x + 1, agent.length );
|
||||||
return theVersion;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getBrowserMajorVersionNumber()
|
function getBrowserMajorVersionNumber()
|
||||||
|
@ -151,7 +151,7 @@ function getBrowserMajorVersionNumber()
|
||||||
var version = getBrowserVersionNumber();
|
var version = getBrowserVersionNumber();
|
||||||
if ( version != "unknown" )
|
if ( version != "unknown" )
|
||||||
{
|
{
|
||||||
var x = theVersion.indexOf( "." );
|
var x = version.indexOf( "." );
|
||||||
if ( x > 0 )
|
if ( x > 0 )
|
||||||
version = version.substring( 0, x );
|
version = version.substring( 0, x );
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче