From: Trevor Parscal Date: Fri, 13 May 2011 14:30:53 +0000 (+0000) Subject: Expanded the contents of a function that was immediately called. X-Git-Tag: 1.31.0-rc.0~30251 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=f8d5c3f8aa16d0f3ebd56bc781eace11584f04dc;p=lhc%2Fweb%2Fwiklou.git Expanded the contents of a function that was immediately called. --- diff --git a/resources/mediawiki/mediawiki.js b/resources/mediawiki/mediawiki.js index 3ceafc272a..939fdc6682 100644 --- a/resources/mediawiki/mediawiki.js +++ b/resources/mediawiki/mediawiki.js @@ -979,22 +979,19 @@ window.mediaWiki = new ( function( $ ) { // include modules which are already loaded batch = []; // Asynchronously append a script tag to the end of the body - var getScriptTag = function() { - var html = ''; - for ( var r = 0; r < requests.length; r++ ) { - requests[r] = sortQuery( requests[r] ); - // Build out the HTML - var src = mw.config.get( 'wgLoadScript' ) + '?' + $.param( requests[r] ); - html += mw.html.element( 'script', - { type: 'text/javascript', src: src }, '' ); - } - return html; - }; + var html = ''; + for ( var r = 0; r < requests.length; r++ ) { + requests[r] = sortQuery( requests[r] ); + // Build out the HTML + var src = mw.config.get( 'wgLoadScript' ) + '?' + $.param( requests[r] ); + html += mw.html.element( 'script', + { 'type': 'text/javascript', 'src': src }, '' ); + } // Load asynchronously after documument ready if ( ready ) { - setTimeout( function() { $( 'body' ).append( getScriptTag() ); }, 0 ); + setTimeout( function() { $( 'body' ).append( html ); }, 0 ); } else { - document.write( getScriptTag() ); + document.write( html ); } } };