Index: trunk/phase3/resources/mediawiki/mediawiki.js |
— | — | @@ -979,22 +979,19 @@ |
980 | 980 | // include modules which are already loaded |
981 | 981 | batch = []; |
982 | 982 | // Asynchronously append a script tag to the end of the body |
983 | | - var getScriptTag = function() { |
984 | | - var html = ''; |
985 | | - for ( var r = 0; r < requests.length; r++ ) { |
986 | | - requests[r] = sortQuery( requests[r] ); |
987 | | - // Build out the HTML |
988 | | - var src = mw.config.get( 'wgLoadScript' ) + '?' + $.param( requests[r] ); |
989 | | - html += mw.html.element( 'script', |
990 | | - { type: 'text/javascript', src: src }, '' ); |
991 | | - } |
992 | | - return html; |
993 | | - }; |
| 983 | + var html = ''; |
| 984 | + for ( var r = 0; r < requests.length; r++ ) { |
| 985 | + requests[r] = sortQuery( requests[r] ); |
| 986 | + // Build out the HTML |
| 987 | + var src = mw.config.get( 'wgLoadScript' ) + '?' + $.param( requests[r] ); |
| 988 | + html += mw.html.element( 'script', |
| 989 | + { 'type': 'text/javascript', 'src': src }, '' ); |
| 990 | + } |
994 | 991 | // Load asynchronously after documument ready |
995 | 992 | if ( ready ) { |
996 | | - setTimeout( function() { $( 'body' ).append( getScriptTag() ); }, 0 ); |
| 993 | + setTimeout( function() { $( 'body' ).append( html ); }, 0 ); |
997 | 994 | } else { |
998 | | - document.write( getScriptTag() ); |
| 995 | + document.write( html ); |
999 | 996 | } |
1000 | 997 | } |
1001 | 998 | }; |