Index: trunk/phase3/includes/ProtectionForm.php |
— | — | @@ -592,7 +592,7 @@ |
593 | 593 | $encOptions = Xml::encodeJsVar( $options ); |
594 | 594 | |
595 | 595 | $script .= "ProtectionForm.init($encOptions)"; |
596 | | - return Html::inlineScript( "if ( mediaWiki !== undefined ) { mediaWiki.loader.using( 'mediawiki.legacy.protect', function() { {$script} } ); }" ); |
| 596 | + return Html::inlineScript( "if ( window.mediaWiki ) { $script }" ); |
597 | 597 | } |
598 | 598 | |
599 | 599 | /** |
Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -2246,7 +2246,7 @@ |
2247 | 2247 | } |
2248 | 2248 | |
2249 | 2249 | $wgOut->addScript( Html::inlineScript( |
2250 | | - "if ( mediaWiki !== undefined ) { $script }" |
| 2250 | + "if ( window.mediaWiki ) { $script }" |
2251 | 2251 | ) ); |
2252 | 2252 | |
2253 | 2253 | $toolbar .= "\n</div>"; |
Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -2381,7 +2381,7 @@ |
2382 | 2382 | if ( $this->getModules() ) { |
2383 | 2383 | $modules = FormatJson::encode( $this->getModules() ); |
2384 | 2384 | $scripts .= Html::inlineScript( |
2385 | | - "if ( mediaWiki !== undefined ) { mediaWiki.loader.load( {$modules} ); mediaWiki.loader.go(); }" |
| 2385 | + "if ( window.mediaWiki ) { mediaWiki.loader.load( {$modules} ); mediaWiki.loader.go(); }" |
2386 | 2386 | ) . "\n"; |
2387 | 2387 | } |
2388 | 2388 | |