Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -2313,10 +2313,11 @@ |
2314 | 2314 | // Statup - this will immediately load jquery and mediawiki modules |
2315 | 2315 | $scripts = self::makeResourceLoaderLink( $sk, 'startup', 'scripts' ); |
2316 | 2316 | |
2317 | | - // Configuration |
| 2317 | + // Configuration -- this could be merged together with the load and go, but makeGlobalVariablesScript returns a |
| 2318 | + // whole script tag -- grumble grumble |
2318 | 2319 | $scripts .= Skin::makeGlobalVariablesScript( $sk->getSkinName() ) . "\n"; |
2319 | 2320 | |
2320 | | - // Support individual script requests in debug mode |
| 2321 | + // Script and Messages "only" |
2321 | 2322 | if ( $wgRequest->getBool( 'debug' ) && $wgRequest->getVal( 'debug' ) !== 'false' ) { |
2322 | 2323 | // Scripts |
2323 | 2324 | foreach ( $this->getModuleScripts() as $name ) { |
— | — | @@ -2336,8 +2337,9 @@ |
2337 | 2338 | $scripts .= self::makeResourceLoaderLink( $sk, $this->getModuleMessages(), 'messages' ); |
2338 | 2339 | } |
2339 | 2340 | } |
| 2341 | + |
| 2342 | + // Modules - let the client calculate dependencies and batch requests as it likes |
2340 | 2343 | if ( $this->getModules() ) { |
2341 | | - // Modules - let the client calculate dependencies and batch requests as it likes |
2342 | 2344 | $modules = FormatJson::encode( $this->getModules() ); |
2343 | 2345 | $scripts .= Html::inlineScript( |
2344 | 2346 | "if ( mediaWiki !== undefined ) { mediaWiki.loader.load( {$modules} ); mediaWiki.loader.go(); }" |