'mw.loader.implement',
array(
$name,
- new XmlJsCode( "function( $, mw ) {{$scripts}}" ),
+ new XmlJsCode( "function( $ ) {{$scripts}}" ),
(object)$styles,
(object)$messages
) );
$dependencies = null, $group = null )
{
if ( is_array( $name ) ) {
- return Xml::encodeJsCall( 'mw.loader.register', array( $name ) );
+ return Xml::encodeJsCall( 'mediaWiki.loader.register', array( $name ) );
} else {
$version = (int) $version > 1 ? (int) $version : 1;
- return Xml::encodeJsCall( 'mw.loader.register',
+ return Xml::encodeJsCall( 'mediaWiki.loader.register',
array( $name, $version, $dependencies, $group ) );
}
}
* @param $configuration Array: List of configuration values keyed by variable name
*/
public static function makeConfigSetScript( array $configuration ) {
- return Xml::encodeJsCall( 'mw.config.set', array( $configuration ) );
+ return Xml::encodeJsCall( 'mediaWiki.config.set', array( $configuration ) );
}
/**
$registrations = self::getModuleRegistrations( $context );
$out .= "var startUp = function() {\n" .
"\t$registrations\n" .
- "\t" . Xml::encodeJsCall( 'mw.config.set', array( $configuration ) ) .
+ "\t" . Xml::encodeJsCall( 'mediaWiki.config.set', array( $configuration ) ) .
"};\n";
// Conditional script injection
/*
* JavaScript for Specical:Search
*/
-( function( $, mw ) {
+( function( $ ) {
// Emulate HTML5 autofocus behavior in non HTML5 compliant browsers
if ( !( 'autofocus' in document.createElement( 'input' ) ) ) {
$( 'input[autofocus]:first' ).focus();
}
-} )( jQuery, mediaWiki );
\ No newline at end of file
+} )( jQuery );
\ No newline at end of file
}
// Execute script
try {
- registry[module].script( jQuery, mediaWiki );
+ registry[module].script( jQuery );
registry[module].state = 'ready';
// Run jobs who's dependencies have just been met
for ( var j = 0; j < jobs.length; j++ ) {
* Implementation for mediaWiki.log stub
*/
-(function ($, mw) {
+(function ($) {
/**
* Log output to the console.
}
// Try to use an existing console
if ( typeof window.console !== 'undefined' && typeof window.console.log == 'function' ) {
- window.console.log( string );
+ console.log( string );
} else {
// Set timestamp
var d = new Date();
}
};
-})(jQuery, mediaWiki);
+})(jQuery);
\ No newline at end of file