* @alternateClassName mediaWiki
* @singleton
*/
-
-var mw = ( function ( $, undefined ) {
+( function ( $ ) {
'use strict';
/* Private Members */
- var hasOwn = Object.prototype.hasOwnProperty,
+ var mw,
+ hasOwn = Object.prototype.hasOwnProperty,
slice = Array.prototype.slice,
trackCallbacks = $.Callbacks( 'memory' ),
trackQueue = [];
/**
* @class mw
*/
- return {
+ mw = {
/* Public Members */
/**
}() )
};
-}( jQuery ) );
+ // Alias $j to jQuery for backwards compatibility
+ // @deprecated since 1.23 Use $ or jQuery instead
+ mw.log.deprecate( window, '$j', $, 'Use $ or jQuery instead.' );
-// Alias $j to jQuery for backwards compatibility
-// @deprecated since 1.23 Use $ or jQuery instead
-mw.log.deprecate( window, '$j', jQuery, 'Use $ or jQuery instead.' );
+ // Attach to window and globally alias
+ window.mw = window.mediaWiki = mw;
-// Attach to window and globally alias
-window.mw = window.mediaWiki = mw;
+ // Auto-register from pre-loaded startup scripts
+ if ( $.isFunction( window.startUp ) ) {
+ window.startUp();
+ window.startUp = undefined;
+ }
-// Auto-register from pre-loaded startup scripts
-if ( jQuery.isFunction( window.startUp ) ) {
- window.startUp();
- window.startUp = undefined;
-}
+}( jQuery ) );