Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -2312,8 +2312,10 @@ |
2313 | 2313 | |
2314 | 2314 | // Statup - this will immediately load jquery and mediawiki modules |
2315 | 2315 | $scripts = self::makeResourceLoaderLink( $sk, 'startup', 'scripts' ); |
| 2316 | + |
2316 | 2317 | // Configuration |
2317 | 2318 | $scripts .= Skin::makeGlobalVariablesScript( $sk->getSkinName() ) . "\n"; |
| 2319 | + |
2318 | 2320 | // Support individual script requests in debug mode |
2319 | 2321 | if ( $wgRequest->getBool( 'debug' ) && $wgRequest->getVal( 'debug' ) !== 'false' ) { |
2320 | 2322 | // Scripts |
— | — | @@ -2341,6 +2343,10 @@ |
2342 | 2344 | "if ( mediaWiki !== undefined ) { mediaWiki.loader.load( {$modules} ); }" |
2343 | 2345 | ); |
2344 | 2346 | } |
| 2347 | + |
| 2348 | + // Add code to fetch all requested modules |
| 2349 | + $scripts .= Html::inlineScript( "if ( mediaWiki !== undefined ) { mediaWiki.loader.go(); }" ); |
| 2350 | + |
2345 | 2351 | // TODO: User Scripts should be included using the resource loader |
2346 | 2352 | // Add user JS if enabled |
2347 | 2353 | if( $this->isUserJsAllowed() && $wgUser->isLoggedIn() ) { |
— | — | @@ -2360,8 +2366,7 @@ |
2361 | 2367 | } |
2362 | 2368 | } |
2363 | 2369 | $scripts .= "\n" . $this->mScripts; |
2364 | | - // This should be at the bottom of the body - below ALL other scripts |
2365 | | - $scripts .= Html::inlineScript( "if ( mediaWiki !== undefined ) { mediaWiki.loader.go(); }" ); |
| 2370 | + |
2366 | 2371 | // Add site JS if enabled |
2367 | 2372 | if ( $wgUseSiteJs ) { |
2368 | 2373 | $scripts .= self::makeResourceLoaderLink( $sk, 'sitejs', 'scripts' ); |