X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=resources%2Fsrc%2Fstartup.js;h=97b4fce258d07c5beaed188e788a118f9cd588b0;hp=eb4dc9fc21d5b7bca8049b56b415bd2c35475a50;hb=d92845c2295d982c80312880c3fae788450676ea;hpb=722b6d6e9545c9a5907254206303ee4ba3018927 diff --git a/resources/src/startup.js b/resources/src/startup.js index eb4dc9fc21..97b4fce258 100644 --- a/resources/src/startup.js +++ b/resources/src/startup.js @@ -12,7 +12,7 @@ if ( !window.performance ) { if ( !performance.mark ) { performance.mark = function () {}; } -performance.mark( 'mediaWikiStartUp' ); +performance.mark( 'mwLoadStart' ); /** * Returns false for Grade C supported browsers. @@ -35,18 +35,18 @@ function isCompatible( ua ) { // Browsers with outdated or limited JavaScript engines get the no-JS experience return !( // Internet Explorer < 8 - ( ua.indexOf( 'MSIE' ) !== -1 && parseFloat( ua.split( 'MSIE' )[1] ) < 8 ) || + ( ua.indexOf( 'MSIE' ) !== -1 && parseFloat( ua.split( 'MSIE' )[ 1 ] ) < 8 ) || // Firefox < 3 - ( ua.indexOf( 'Firefox/' ) !== -1 && parseFloat( ua.split( 'Firefox/' )[1] ) < 3 ) || + ( ua.indexOf( 'Firefox/' ) !== -1 && parseFloat( ua.split( 'Firefox/' )[ 1 ] ) < 3 ) || // Opera < 12 ( ua.indexOf( 'Opera/' ) !== -1 && ( ua.indexOf( 'Version/' ) === -1 ? // "Opera/x.y" - parseFloat( ua.split( 'Opera/' )[1] ) < 10 : + parseFloat( ua.split( 'Opera/' )[ 1 ] ) < 10 : // "Opera/9.80 ... Version/x.y" - parseFloat( ua.split( 'Version/' )[1] ) < 12 + parseFloat( ua.split( 'Version/' )[ 1 ] ) < 12 ) ) || // "Mozilla/0.0 ... Opera x.y" - ( ua.indexOf( 'Opera ' ) !== -1 && parseFloat( ua.split( ' Opera ' )[1] ) < 10 ) || + ( ua.indexOf( 'Opera ' ) !== -1 && parseFloat( ua.split( ' Opera ' )[ 1 ] ) < 10 ) || // BlackBerry < 6 ua.match( /BlackBerry[^\/]*\/[1-5]\./ ) || // Open WebOS < 1.5 @@ -75,6 +75,7 @@ function isCompatible( ua ) { // See OutputPage::getHeadScripts(). document.documentElement.className = document.documentElement.className .replace( /(^|\s)client-js(\s|$)/, '$1client-nojs$2' ); + return; } /** @@ -111,5 +112,5 @@ function isCompatible( ua ) { startUp(); } }; - document.getElementsByTagName( 'head' )[0].appendChild( script ); + document.getElementsByTagName( 'head' )[ 0 ].appendChild( script ); }() );