"module": false,
"mw": false,
"$": false,
- "mediaWiki": false,
- "jQuery": false,
"OO": false
},
"rules": {
/* global extDependencyMap */
-( function ( $ ) {
+( function () {
$( function () {
var $label, labelText;
} );
} );
} );
-}( jQuery ) );
+}() );
*
* @class jQuery.plugin.spinner
*/
-( function ( $ ) {
+( function () {
// Default options for new spinners,
// stored outside the function to share between calls.
* @mixins jQuery.plugin.spinner
*/
-}( jQuery ) );
+}() );
*
* @author Christian Bach/christian.bach@polyester.se
*/
-( function ( $, mw ) {
+( function () {
var ts,
parsers = [];
type: 'numeric'
} );
-}( jQuery, mediaWiki ) );
+}() );
// * This installation of tipsy includes several local modifications to both Javascript and CSS.
// Please be careful when upgrading.
-( function ( mw, $ ) {
+( function () {
function maybeCall(thing, ctx) {
return (typeof thing == 'function') ? (thing.call(ctx)) : thing;
}
};
-}( mediaWiki, jQuery ) );
+}() );
*
* @class jQuery.plugin.accessKeyLabel
*/
-( function ( $, mw ) {
+( function () {
// Cached access key modifiers for used browser
var cachedAccessKeyModifiers,
* @mixins jQuery.plugin.accessKeyLabel
*/
-}( jQuery, mediaWiki ) );
+}() );
* @param {string} str
* @return {number}
*/
-mediaWiki.log.deprecate( jQuery, 'byteLength', require( 'mediawiki.String' ).byteLength,
+mw.log.deprecate( $, 'byteLength', require( 'mediawiki.String' ).byteLength,
'Use require( \'mediawiki.String\' ).byteLength instead.', '$.byteLength' );
/**
/**
* @class jQuery.plugin.checkboxShiftClick
*/
-( function ( $ ) {
+( function () {
/**
* Enable checkboxes to be checked or unchecked in a row by clicking one,
* @mixins jQuery.plugin.checkboxShiftClick
*/
-}( jQuery ) );
+}() );
*
* - 2011-01-05: Forked for MediaWiki. See also jQuery.colorUtil plugin
*/
-( function ( $ ) {
+( function () {
function getColor( elem, attr ) {
var color;
};
} );
-}( jQuery ) );
+}() );
* Mostly based on other plugins and functions (linted and optimized a little).
* Sources cited inline.
*/
-( function ( $ ) {
+( function () {
/**
* @class jQuery.colorUtil
* @singleton
};
-}( jQuery ) );
+}() );
*
* @class jQuery.plugin.confirmable
*/
-( function ( $ ) {
+( function () {
var identity = function ( data ) {
return data;
};
noTitle: undefined
}
};
-}( jQuery ) );
+}() );
* This file serves to inject our localised messages into it.
*/
-( function ( mw, $ ) {
+( function () {
$.fn.confirmable.defaultOptions.i18n = {
space: mw.message( 'word-separator' ).text(),
confirm: mw.message( 'confirmable-confirm', mw.user ).text(),
yesTitle: undefined,
noTitle: undefined
};
-}( mediaWiki, jQuery ) );
+}() );
/**
* @class jQuery.plugin.getAttrs
*/
-( function ( $ ) {
+( function () {
function serializeControls( controls ) {
var i,
data = {},
$.fn.serializeObject = function () {
return serializeControls( this.serializeArray() );
};
-}( jQuery ) );
+}() );
*
* @class jQuery.plugin.hidpi
*/
-( function ( $ ) {
+( function () {
/**
* Get reported or approximate device pixel ratio.
* @mixins jQuery.plugin.hidpi
*/
-}( jQuery ) );
+}() );
* TODO: Add a function for restoring the previous text.
* TODO: Accept mappings for converting shortcuts like WP: to Wikipedia:.
*/
-( function ( $, mw ) {
+( function () {
$.highlightText = {
} );
};
-}( jQuery, mediaWiki ) );
+}() );
/**
* @class jQuery.plugin.lengthLimit
*/
-( function ( $, mw ) {
+( function () {
var
eventKeys = [
* @class jQuery
* @mixins jQuery.plugin.lengthLimit
*/
-}( jQuery, mediaWiki ) );
+}() );
/**
* @class jQuery.plugin.localize
*/
-( function ( $, mw ) {
+( function () {
/**
* Gets a localized message, using parameters from options if present.
* @mixins jQuery.plugin.localize
*/
-}( jQuery, mediaWiki ) );
+}() );
*
* @class jQuery.plugin.makeCollapsible
*/
-( function ( $, mw ) {
+( function () {
/**
* Handler for a click on a collapsible toggler.
*
* @mixins jQuery.plugin.makeCollapsible
*/
-}( jQuery, mediaWiki ) );
+}() );
/**
* JavaScript to show jump links to motor-impaired users when they are focused.
*/
-jQuery( function ( $ ) {
+$( function () {
$( '.mw-jump' ).on( 'focus blur', 'a', function ( e ) {
// Confusingly jQuery leaves e.type as focusout for delegated blur events
* input or not.
*/
-( function ( $, mw ) {
+( function () {
var hasOwn = Object.hasOwnProperty;
* @mixins jQuery.plugin.suggestions
*/
-}( jQuery, mediaWiki ) );
+}() );
/**
* @class jQuery.plugin.tabIndex
*/
-( function ( $ ) {
+( function () {
/**
* Find the lowest tabindex in use within a selection.
* @mixins jQuery.plugin.tabIndex
*/
-}( jQuery ) );
+}() );
* $textbox.textSelection( 'encapsulateSelection', { pre: '<b>', post: '</b>' } );
* // Result: Textbox contains 'This is <b>bold</b>!', with cursor before the '!'
*/
-( function ( $ ) {
+( function () {
/**
* Do things to the selection in a `<textarea>`, or a textarea-like editable element.
*
* @inheritdoc jQuery.plugin.textSelection#textSelection
*/
-}( jQuery ) );
+}() );
-( function ( mw, $ ) {
+( function () {
/**
* Create an object like mw.Api, but automatically handling everything required to communicate
// Expose
mw.ForeignApi = CoreForeignApi;
-}( mediaWiki, jQuery ) );
+}() );
/* global moment, Uint8Array */
-( function ( $, mw ) {
+( function () {
/**
* mw.ForeignStructuredUpload.BookletLayout encapsulates the process
this.dateWidget.setValue( '' ).setValidityFlag( true );
};
-}( jQuery, mediaWiki ) );
+}() );
-( function ( mw, $, OO ) {
+( function () {
/**
* Used to represent an upload in progress on the frontend.
*
};
mw.ForeignStructuredUpload = ForeignStructuredUpload;
-}( mediaWiki, jQuery, OO ) );
+}() );
-( function ( mw, OO, $ ) {
+( function () {
/**
* Used to represent an upload in progress on the frontend.
*
};
mw.ForeignUpload = ForeignUpload;
-}( mediaWiki, OO, jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* @class mw.RegExp
*/
return str.replace( /([\\{}()|.?*+\-^$\[\]])/g, '\\$1' ); // eslint-disable-line no-useless-escape
}
};
-}( mediaWiki ) );
+}() );
* @since 1.18
*/
-( function ( mw, $ ) {
+( function () {
/**
* Parse titles into an object structure. Note that when using the constructor
* directly, passing invalid titles will result in an exception. Use #newFromText to use the
// Expose
mw.Title = Title;
-}( mediaWiki, jQuery ) );
+}() );
// (It is excluded in jsduck.json.)
// ESLint suggests unquoting some object keys, which would render the file unparseable by Opera 12.
/* eslint-disable quote-props */
-( function ( mw ) {
+( function () {
var toUpperMapping = {
'ß': 'ß',
'ʼn': 'ʼn',
var mapped = toUpperMapping[ chr ];
return mapped || chr.toUpperCase();
};
-}( mediaWiki ) );
+}() );
/* global moment */
-( function ( $, mw, moment ) {
+( function () {
/**
* mw.Upload.BookletLayout encapsulates the process of uploading a file
this.filenameUsageWidget.setValue( null );
};
-}( jQuery, mediaWiki, moment ) );
+}() );
-( function ( $, mw ) {
+( function () {
/**
* mw.Upload.Dialog controls a {@link mw.Upload.BookletLayout BookletLayout}.
this.uploadBooklet.clear();
}, this );
};
-}( jQuery, mediaWiki ) );
+}() );
-( function ( mw, $ ) {
+( function () {
var UP;
/**
};
mw.Upload = Upload;
-}( mediaWiki, jQuery ) );
+}() );
* @class mw.Uri
*/
-( function ( mw, $ ) {
+( function () {
var parser, properties;
/**
return location.href;
} );
-}( mediaWiki, jQuery ) );
+}() );
/*!
* JavaScript for Special:RevisionDelete
*/
-( function ( mw, $ ) {
+( function () {
$( function () {
var colonSeparator = mw.message( 'colon-separator' ).text(),
summaryCodePointLimit = mw.config.get( 'wgCommentCodePointLimit' ),
}
} );
-}( mediaWiki, jQuery ) );
+}() );
/*!
* Scripts for action=delete at domready
*/
-( function ( mw, $ ) {
+( function () {
$( function () {
var colonSeparator = mw.message( 'colon-separator' ).text(),
summaryCodePointLimit = mw.config.get( 'wgCommentCodePointLimit' ),
reason.$input.byteLimit( summaryByteLimit, filterFn );
}
} );
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
var collapsibleLists, handleOne;
// Collapsible lists of categories and templates
);
}
} );
-}( mediaWiki ) );
+}() );
/*
* Javascript for module editWarning
*/
-( function ( mw, $ ) {
+( function () {
'use strict';
$( function () {
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
/*!
* Scripts for action=edit at domready
*/
-( function ( mw, $ ) {
+( function () {
'use strict';
/**
} );
}
} );
-}( mediaWiki, jQuery ) );
+}() );
/*!
* Live edit preview.
*/
-( function ( mw, $ ) {
+( function () {
/**
* @ignore
$( document.body ).on( 'click', '#wpPreview, #wpDiff', doLivePreview );
} );
-}( mediaWiki, jQuery ) );
+}() );
* Scripts for pre-emptive edit preparing on action=edit
*/
-( function ( mw, $ ) {
+( function () {
if ( !mw.config.get( 'wgAjaxEditStash' ) ) {
return;
}
checkStash();
}
} );
-}( mediaWiki, jQuery ) );
+}() );
/*!
* JavaScript for History action
*/
-jQuery( function ( $ ) {
+$( function () {
var $historyCompareForm = $( '#mw-history-compare' ),
$historySubmitter,
$lis = $( '#pagehistory > li' );
/*!
* Enables double-click-to-edit functionality.
*/
-( function ( mw, $ ) {
+( function () {
$( function () {
mw.util.$content.dblclick( function ( e ) {
var $a;
}
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
*
* See also ImagePage.php#makeMetadataTable (creates the HTML)
*/
-( function ( mw, $ ) {
+( function () {
$( function () {
var $tables = $( '.mw_metadata' );
if ( !$tables.find( '.mw-metadata-collapsible, .collapsable' ).length ) {
$tables.addClass( 'collapsed' );
} );
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw, $ ) {
+( function () {
'use strict';
/**
} );
}
-}( mediaWiki, jQuery ) );
+}() );
* This is loaded in the top queue, so avoid unnecessary dependencies
* like mediawiki.Title or mediawiki.Uri.
*/
-( function ( mw, $ ) {
+( function () {
var profile = $.client.profile(),
canonical = mw.config.get( 'wgInternalRedirectTargetUrl' ),
fragment = null,
} );
}
-}( mediaWiki, jQuery ) );
+}() );
* When the user right-clicks in a heading, it will open the
* edit screen.
*/
-( function ( $ ) {
+( function () {
// Trigger this when a contextmenu click on the page targets an h1-h6 element.
// This uses a delegate handler which 1) starts immediately instead of blocking
// response on dom-ready, and 2) selects and binds once instead of N times.
$edit.get( 0 ).click();
}
} );
-}( jQuery ) );
+}() );
/**
* @class mw.Api.plugin.category
*/
-( function ( mw, $ ) {
+( function () {
$.extend( mw.Api.prototype, {
/**
* @mixins mw.Api.plugin.category
*/
-}( mediaWiki, jQuery ) );
+}() );
/**
* @class mw.Api.plugin.edit
*/
-( function ( mw, $ ) {
+( function () {
$.extend( mw.Api.prototype, {
* @mixins mw.Api.plugin.edit
*/
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw, $ ) {
+( function () {
/**
* @class mw.Api
];
mw.log.deprecate( mw.Api, 'warnings', mw.Api.warnings, null, 'mw.Api.warnings' );
-}( mediaWiki, jQuery ) );
+}() );
* @class mw.Api.plugin.login
* @since 1.22
*/
-( function ( mw, $ ) {
+( function () {
'use strict';
$.extend( mw.Api.prototype, {
* @mixins mw.Api.plugin.login
*/
-}( mediaWiki, jQuery ) );
+}() );
* @class mw.Api.plugin.messages
* @since 1.27
*/
-( function ( mw, $ ) {
+( function () {
'use strict';
$.extend( mw.Api.prototype, {
* @mixins mw.Api.plugin.messages
*/
-}( mediaWiki, jQuery ) );
+}() );
/**
* @class mw.Api.plugin.options
*/
-( function ( mw, $ ) {
+( function () {
$.extend( mw.Api.prototype, {
* @mixins mw.Api.plugin.options
*/
-}( mediaWiki, jQuery ) );
+}() );
/**
* @class mw.Api.plugin.parse
*/
-( function ( mw, $ ) {
+( function () {
$.extend( mw.Api.prototype, {
/**
* @mixins mw.Api.plugin.parse
*/
-}( mediaWiki, jQuery ) );
+}() );
* @class mw.Api.plugin.rollback
* @since 1.28
*/
-( function ( mw, $ ) {
+( function () {
$.extend( mw.Api.prototype, {
/**
* @mixins mw.Api.plugin.rollback
*/
-}( mediaWiki, jQuery ) );
+}() );
* @class mw.Api.plugin.upload
* @singleton
*/
-( function ( mw, $ ) {
+( function () {
var nonce = 0,
fieldsAllowed = {
stash: true,
* @class mw.Api
* @mixins mw.Api.plugin.upload
*/
-}( mediaWiki, jQuery ) );
+}() );
* @class mw.Api.plugin.user
* @since 1.27
*/
-( function ( mw, $ ) {
+( function () {
$.extend( mw.Api.prototype, {
* @mixins mw.Api.plugin.user
*/
-}( mediaWiki, jQuery ) );
+}() );
* @class mw.Api.plugin.watch
* @since 1.19
*/
-( function ( mw, $ ) {
+( function () {
/**
* @private
* @mixins mw.Api.plugin.watch
*/
-}( mediaWiki, jQuery ) );
+}() );
* Jeroen De Dauw <jeroendedauw at gmail dot com>
*/
-( function ( $ ) {
+( function () {
'use strict';
$( function () {
} );
-}( jQuery ) );
+}() );
-( function ( mw, $ ) {
+( function () {
/**
* Prevent the closing of a window with a confirm message (the onbeforeunload event seems to
* work in most browsers.)
}
};
};
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw, $ ) {
+( function () {
'use strict';
/**
}
};
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw, $ ) {
+( function () {
'use strict';
var debug,
debug.init();
} );
-}( mediaWiki, jQuery ) );
+}() );
* @private
* @class jQuery.plugin.footHovzer
*/
-( function ( $ ) {
+( function () {
var $hovzer, footHovzer, $spacer;
function getHovzer() {
* @mixins jQuery.plugin.footHovzer
*/
-}( jQuery ) );
+}() );
-( function ( mw, $ ) {
+( function () {
var CONTROL_BUCKET = 'control',
MAX_INT32_UNSIGNED = 4294967295;
}
};
-}( mediaWiki, jQuery ) );
+}() );
* @author Moriel Schottlender, 2015
* @since 1.19
*/
-( function ( mw, $ ) {
+( function () {
/**
* This is a way of getting simple feedback from users. It's useful
* for testing new features -- users can give you feedback without
return this.bugReportLink;
};
-}( mediaWiki, jQuery ) );
+}() );
* @author Mark Holmquist, 2015
* @since 1.25
*/
-( function ( mw, $, oo ) {
+( function () {
var warningConfig = mw.config.get( 'wgFileWarning' ),
warningMessages = warningConfig.messages,
warningLink = warningConfig.link,
.addClass( 'mediawiki-filewarning-info empty' ),
$footer = $( '<p>' )
.addClass( 'mediawiki-filewarning-footer empty' ),
- dialog = new oo.ui.PopupButtonWidget( {
+ dialog = new OO.ui.PopupButtonWidget( {
classes: [ 'mediawiki-filewarning-anchor' ],
label: $mimetype,
flags: [ 'warning' ],
// object at all. Sort of nasty, but it gets the job done.
dialog.getPopup().toggle = $.noop;
}
-}( mediaWiki, jQuery, OO ) );
+}() );
-( function ( mw, $ ) {
+( function () {
// FIXME: mw.htmlform.Element also sets this to empty object
mw.htmlform = {};
return this;
};
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
// FIXME: mw.htmlform.Checker also sets this to empty object
mw.htmlform = {};
OO.inheritClass( mw.htmlform.ActionFieldLayout, OO.ui.ActionFieldLayout );
OO.mixinClass( mw.htmlform.ActionFieldLayout, mw.htmlform.Element );
-}( mediaWiki ) );
+}() );
* HTMLForm enhancements:
* Set up autocomplete fields.
*/
-( function ( mw, $ ) {
+( function () {
mw.hook( 'htmlform.enhance' ).add( function ( $root ) {
var $autocomplete = $root.find( '.mw-htmlform-autocomplete' );
}
} );
-}( mediaWiki, jQuery ) );
+}() );
* HTMLForm enhancements:
* Infuse some OOUI HTMLForm fields (those which benefit from always being infused).
*/
-( function ( mw, $ ) {
+( function () {
mw.hook( 'htmlform.enhance' ).add( function ( $root ) {
var $oouiNodes, modules, extraModules;
} );
-}( mediaWiki, jQuery ) );
+}() );
* HTMLForm enhancements:
* Show fancy tooltips for checkmatrix fields.
*/
-( function ( mw ) {
+( function () {
mw.hook( 'htmlform.enhance' ).add( function ( $root ) {
var $matrixTooltips = $root.find( '.mw-htmlform-matrix .mw-htmlform-tooltip' );
}
} );
-}( mediaWiki ) );
+}() );
* HTMLForm enhancements:
* Add/remove cloner clones without having to resubmit the form.
*/
-( function ( mw, $ ) {
+( function () {
var cloneCounter = 0;
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
* HTMLForm enhancements:
* Set up 'hide-if' behaviors for form fields that have them.
*/
-( function ( mw, $ ) {
+( function () {
/**
* Helper function for hide-if to find the nearby form field.
}
v = spec[ 2 ];
- if ( !( field instanceof jQuery ) ) {
+ if ( !( field instanceof $ ) ) {
// field is a OO.ui.Widget
if ( field.supports( 'isSelected' ) ) {
getVal = function () {
// It is impossible to submit a form with hidden fields failing validation, e.g. one that
// is required. However, validity is not checked for disabled fields, as these are not
// submitted with the form. So we should also disable fields when hiding them.
- if ( self instanceof jQuery ) {
+ if ( self instanceof $ ) {
// This also finds elements inside any nested fields (in case of HTMLFormFieldCloner),
// which is problematic. But it works because:
// * HTMLFormFieldCloner::createFieldsForKey() copies 'hide-if' rules to nested fields
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw, $ ) {
+( function () {
$( function () {
mw.hook( 'htmlform.enhance' ).fire( $( document ) );
$root.find( '.mw-htmlform' ).removeAttr( 'novalidate' );
} );
-}( mediaWiki, jQuery ) );
+}() );
* HTMLForm enhancements:
* Convert multiselect fields from checkboxes to Chosen selector when requested.
*/
-( function ( mw, $ ) {
+( function () {
function addMulti( $oldContainer, $container ) {
var name = $oldContainer.find( 'input:first-child' ).attr( 'name' ),
}
} );
-}( mediaWiki, jQuery ) );
+}() );
* HTMLForm enhancements:
* Add a dynamic max length to the reason field of SelectAndOther.
*/
-( function ( mw, $ ) {
+( function () {
// cache the separator to avoid object creation on each keypress
var colonSeparator = mw.message( 'colon-separator' ).text();
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
* HTMLForm enhancements:
* Animate the SelectOrOther fields, to only show the text field when 'other' is selected.
*/
-( function ( mw, $ ) {
+( function () {
/**
* @class jQuery.plugin.htmlform
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
/* eslint-disable no-console */
-( function ( mw, $ ) {
+( function () {
// mw.inspect is a singleton class with static methods
// that itself can also be invoked as a function (mediawiki.base/mw#inspect).
mw.log( 'mw.inspect: reports are not available in debug mode.' );
}
-}( mediaWiki, jQuery ) );
+}() );
* @author neilk@wikimedia.org
* @author mflaschen@wikimedia.org
*/
-( function ( mw, $ ) {
+( function () {
/**
* @class mw.jqueryMsg
* @singleton
if ( typeof children[ i ] !== 'object' ) {
children[ i ] = document.createTextNode( children[ i ] );
}
- if ( children[ i ] instanceof jQuery && children[ i ].hasClass( 'mediaWiki_htmlEmitter' ) ) {
+ if ( children[ i ] instanceof $ && children[ i ].hasClass( 'mediaWiki_htmlEmitter' ) ) {
children[ i ] = children[ i ].contents();
}
}
* @return {string} Textual value of input
*/
function textify( input ) {
- if ( input instanceof jQuery ) {
+ if ( input instanceof $ ) {
input = input.text();
}
return String( input );
var $el,
arg = nodes[ 0 ],
contents = nodes[ 1 ];
- if ( arg instanceof jQuery && !arg.hasClass( 'mediaWiki_htmlEmitter' ) ) {
+ if ( arg instanceof $ && !arg.hasClass( 'mediaWiki_htmlEmitter' ) ) {
$el = arg;
} else {
$el = $( '<a>' );
for ( formIndex = 0; formIndex < forms.length; formIndex++ ) {
form = forms[ formIndex ];
- if ( form instanceof jQuery && form.hasClass( 'mediaWiki_htmlEmitter' ) ) {
+ if ( form instanceof $ && form.hasClass( 'mediaWiki_htmlEmitter' ) ) {
// This is a nested node, may be an explicit plural form like 5=[$2 linktext]
firstChild = form.contents().get( 0 );
if ( firstChild && firstChild.nodeType === Node.TEXT_NODE ) {
};
}() );
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
'use strict';
/**
}
};
-}( mediaWiki ) );
+}() );
/*
* Language-fallback-chain-related utilities for mediawiki.language.
*/
-( function ( mw, $ ) {
+( function () {
/**
* @class mw.language
*/
} );
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* Base language object with methods related to language support, attempting to mirror some of the
* functionality of the Language class in MediaWiki:
}
};
-}( mediaWiki ) );
+}() );
/*
* Methods for transforming message syntax.
*/
-( function ( mw, $ ) {
+( function () {
/**
* @class mw.language
return forms[ form ][ word ];
}
- transformations = mediaWiki.language.getData( userLanguage, 'grammarTransformations' );
+ transformations = mw.language.getData( userLanguage, 'grammarTransformations' );
if ( !( transformations && transformations[ form ] ) ) {
return word;
}
} );
-}( mediaWiki, jQuery ) );
+}() );
*
* Loading this module also ensures the availability of appropriate messages via mw.msg.
*/
-( function ( mw ) {
+( function () {
var
monthMessages = [
'january', 'february', 'march', 'april',
abbrev: monthAbbrevMessages.map( mwMsgMapper )
};
-}( mediaWiki ) );
+}() );
/*
* Number-related utilities for mediawiki.language.
*/
-( function ( mw, $ ) {
+( function () {
/**
* @class mw.language
*/
} );
-}( mediaWiki, jQuery ) );
+}() );
/* eslint-disable no-restricted-properties */
-( function ( mw, $ ) {
+( function () {
var ProtectionForm,
reasonCodePointLimit = mw.config.get( 'wgCommentCodePointLimit' ),
reasonByteLimit = mw.config.get( 'wgCommentByteLimit' );
$( ProtectionForm.init.bind( ProtectionForm ) );
-}( mediaWiki, jQuery ) );
+}() );
/**
* MediaWiki legacy wikibits
*/
-( function ( mw, $ ) {
+( function () {
var msg,
loadedScripts = {};
}, 'Use jQuery or mw.loader.load instead.', 'document.' + method );
} );
-}( mediaWiki, jQuery ) );
+}() );
/* global JpegMeta */
-( function ( mw ) {
+( function () {
// Export as module
module.exports = function ( fileReaderResult, fileName ) {
// Back-compat: Also expose via mw.lib
// @deprecated since 1.31
mw.log.deprecate( mw.libs, 'jpegmeta', module.exports );
-}( mediaWiki ) );
+}() );
module.exports = window.pluralRuleParser;
// Back-compat: Also expose via mw.lib
-mediaWiki.libs.pluralRuleParser = window.pluralRuleParser;
+mw.libs.pluralRuleParser = window.pluralRuleParser;
-( function ( mw, $ ) {
+( function () {
/**
* This is an implementation of MessagePoster for wikitext talk pages.
*
mw.messagePoster.factory.register( 'wikitext', WikitextMessagePoster );
mw.messagePoster.WikitextMessagePoster = WikitextMessagePoster;
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* This is the abstract base class for MessagePoster implementations.
*
* something.
*/
mw.messagePoster.MessagePoster.prototype.post = function () {};
-}( mediaWiki ) );
+}() );
-( function ( mw, $ ) {
+( function () {
/**
* Factory for MessagePoster objects. This provides a pluggable to way to script the action
* of adding a message to someone's talk page.
mw.messagePoster = {
factory: new MessagePosterFactory()
};
-}( mediaWiki, jQuery ) );
+}() );
* @class mw.plugin.convertmessagebox
* @singleton
*/
-( function ( mw, $ ) {
+( function () {
'use strict';
/**
module.exports = convertmessagebox;
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw, $ ) {
+( function () {
'use strict';
var notification,
mw.notification = notification;
-}( mediaWiki, jQuery ) );
+}() );
/**
* @class mw.plugin.notify
*/
-( function ( mw ) {
+( function () {
'use strict';
/**
* @mixins mw.plugin.notify
*/
-}( mediaWiki ) );
+}() );
* - Toggle gallery captions when focused.
* - Dynamically resize images to fill horizontal space.
*/
-( function ( mw, $ ) {
+( function () {
var $galleries,
bound = false,
lastWidth = window.innerWidth,
}
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
/*!
* mw.GallerySlideshow: Interface controls for the slideshow gallery
*/
-( function ( mw, $, OO ) {
+( function () {
/**
* mw.GallerySlideshow encapsulates the user interface of the slideshow
* galleries. An object is instantiated for each `.mw-gallery-slideshow`
new mw.GallerySlideshow( this );
} );
} );
-}( mediaWiki, jQuery, OO ) );
+}() );
* Implement AJAX navigation for multi-page images so the user may browse without a full page reload.
*/
-( function ( mw, $ ) {
+( function () {
var jqXhr, $multipageimage, $spinner,
cache = {},
cacheOrder = [];
} );
}
} );
-}( mediaWiki, jQuery ) );
+}() );
* @since 1.21
* @author Marius Hoch <hoo@online.de>
*/
-( function ( mw, $ ) {
+( function () {
if ( !mw.user.tokens.exists( 'patrolToken' ) ) {
// Current user has no patrol right, or an old cached version of user.tokens
// that didn't have patrolToken yet.
e.preventDefault();
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw, $ ) {
+( function () {
mw.hook( 'wikipage.content' ).add( function ( $content ) {
var $sortable, $collapsible;
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
* @since 1.28
* @author Timo Tijhof
*/
-( function ( mw, $ ) {
+( function () {
$( function () {
$( '.mw-rollback-link' ).on( 'click', 'a[data-mw="interface"]', function ( e ) {
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw, $ ) {
+( function () {
// Break out of framesets
if ( mw.config.get( 'wgBreakFrames' ) ) {
// Note: In IE < 9 strict comparison to window is non-standard (the standard didn't exist yet)
}
} );
-}( mediaWiki, jQuery ) );
+}() );
* @class mw.plugin.page.watch.ajax
* @singleton
*/
-( function ( mw, $ ) {
+( function () {
var watch,
// The name of the page to watch or unwatch
title = mw.config.get( 'wgRelevantPageName' );
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* View model for the changes list
*
mw.rcfilters.dm.ChangesListViewModel.prototype.hasUnseenWatchedChanges = function () {
return this.unseenWatchedChanges;
};
-}( mediaWiki ) );
+}() );
/* eslint-disable no-restricted-properties */
-( function ( mw ) {
+( function () {
/**
* View model for a filter group
*
itemModel.toggleVisible( visibleItems.indexOf( itemModel ) !== -1 );
} );
};
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* Filter item model
*
return this.visible;
};
-}( mediaWiki ) );
+}() );
/* eslint-disable no-restricted-properties */
-( function ( mw, $ ) {
+( function () {
/**
* View model for the filters selection and display
*
this.getItemByName( filterName ).clearHighlightColor();
};
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* RCFilter base item model
*
mw.rcfilters.dm.ItemModel.prototype.isHighlighted = function () {
return !!this.getHighlightColor();
};
-}( mediaWiki ) );
+}() );
/* eslint-disable no-restricted-properties */
-( function ( mw, $ ) {
+( function () {
/**
* View model for saved queries
*
mw.rcfilters.dm.SavedQueriesModel.prototype.isConverted = function () {
return this.converted;
};
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* View model for a single saved query
*
this.emit( 'update' );
}
};
-}( mediaWiki ) );
+}() );
/* eslint-disable no-restricted-properties */
-( function ( mw, $ ) {
+( function () {
var byteLength = require( 'mediawiki.String' ).byteLength;
this.filtersModel.getViewTrigger( view )
);
};
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* Supported highlight colors.
* Warning: These are also hardcoded in "styles/mw.rcfilters.variables.less"
* @property {string[]}
*/
mw.rcfilters.HighlightColors = [ 'c1', 'c2', 'c3', 'c4', 'c5' ];
-}( mediaWiki ) );
+}() );
-( function ( mw, $ ) {
+( function () {
/* eslint no-underscore-dangle: "off" */
/**
* URI Processor for RCFilters
{ urlversion: '2' }
);
};
-}( mediaWiki, jQuery ) );
+}() );
/*!
* JavaScript for Special:RecentChanges
*/
-( function ( mw, $ ) {
+( function () {
var rcfilters = {
/**
* @member mw.rcfilters
module.exports = rcfilters;
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* @class
* @singleton
}
}
};
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* Widget defining the button controlling the popup for the number of results
*
}
};
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* Widget defining the popup to choose number of results
*
mw.rcfilters.ui.ChangesLimitPopupWidget.prototype.onGroupByPageModelUpdate = function () {
this.groupByPageCheckbox.setSelected( this.groupByPageItemModel.isSelected() );
};
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* List of changes
*
// Turn off highlights
this.$element.removeClass( 'mw-rcfilters-ui-changesListWrapperWidget-highlighted' );
};
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* A widget representing a single toggle filter
*
mw.rcfilters.ui.CheckboxInputWidget.prototype.onUserChange = function () {
this.emit( 'userChange', this.$input.prop( 'checked' ) );
};
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* Widget defining the popup to choose date for the results
*
*
* A days item was chosen
*/
-}( mediaWiki ) );
+}() );
-( function ( mw, $ ) {
+( function () {
/**
* A button to configure highlight for a filter item
*
);
} );
};
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw, $ ) {
+( function () {
/**
* Menu header for the RCFilters filters menu
*
mw.rcfilters.ui.FilterMenuHeaderWidget.prototype.onInvertNamespacesButtonClick = function () {
this.controller.toggleInvertedNamespaces();
};
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* A widget representing a single toggle filter
*
} );
}
};
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* A widget representing a menu section for filter groups
*
return this.model.getName();
};
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* Extend OOUI's FilterTagItemWidget to also display a popup on hover.
*
invalid: this.itemModel.isSelected() && this.itemModel.isConflicted()
} );
};
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* List displaying all filter groups
*
} );
}
};
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* List displaying all filter groups
*
mw.rcfilters.ui.FilterWrapperWidget.prototype.onNewChangesExist = function ( newChangesExist ) {
this.showNewChangesLink.toggle( newChangesExist );
};
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* Wrapper for the RC form with hide/show links
* Must be constructed after the model is initialized.
this.$element.detach();
}
};
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* A group widget to allow for aggregation of events
*
OO.inheritClass( mw.rcfilters.ui.GroupWidget, OO.ui.Widget );
OO.mixinClass( mw.rcfilters.ui.GroupWidget, OO.ui.mixin.GroupWidget );
-}( mediaWiki ) );
+}() );
-( function ( mw, $ ) {
+( function () {
/**
* A widget representing a filter item highlight color picker
*
}
this.emit( 'chooseColor', color );
};
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw, $ ) {
+( function () {
/**
* A popup containing a color picker, for setting highlight colors.
*
this.toggle( false );
};
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* A widget representing a base toggle item
*
return this.itemModel;
};
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* Widget for toggling live updates
*
this.setState( enable );
};
-}( mediaWiki ) );
+}() );
-( function ( $, mw ) {
+( function () {
/**
* Wrapper for changes list content
*
return new mw.rcfilters.ui.FormWrapperWidget(
this.model, this.changesListModel, this.controller, this.$formContainer );
};
-}( jQuery, mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* Button for marking all changes as seen on the Watchlist
*
this.setDisabled( !this.model.hasUnseenWatchedChanges() );
};
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* A floating menu widget for the filter list
*
mw.rcfilters.ui.MenuSelectWidget.prototype.setUserSelecting = function ( isSelecting ) {
this.userSelecting = !!isSelecting;
};
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* Top section (between page title and filters) on Special:Recentchanges
*
}
this.$topLinks.toggleClass( 'mw-recentchanges-toplinks-collapsed', state === 'collapsed' );
};
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* Widget to select and display target page on Special:RecentChangesLinked (AKA Related Changes)
*
this.titleSearch.setValue( text );
this.titleSearch.setTitle( text );
};
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* Widget to select to view changes that link TO or FROM the target page
* on Special:RecentChangesLinked (AKA Related Changes)
'rcfilters-filter-showlinkedfrom-label'
) );
};
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* Top section (between page title and filters) on Special:RecentChangesLinked (AKA RelatedChanges)
*
/* Initialization */
OO.inheritClass( mw.rcfilters.ui.RclTopSectionWidget, OO.ui.Widget );
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* Save filters widget. This widget is displayed in the tag area
* and allows the user to save the current state of the system
this.emit( 'saveCurrent' );
}
};
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* Quick links menu option widget
*
return this.model.getID();
};
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* Quick links widget
*
this.menu.removeItems( [ this.menu.findItemFromData( item.getID() ) ] );
this.placeholderItem.toggle( this.model.isEmpty() );
};
-}( mediaWiki ) );
+}() );
-( function ( mw, $ ) {
+( function () {
/**
* Extend OOUI's TagItemWidget to also display a popup on hover.
*
this.itemModel.disconnect( this );
this.closeButton.disconnect( this );
};
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* Widget defining the behavior used to choose from a set of values
* in a single_value group
this.selectWidget.selectItemByData( selectedItem.getName() );
}
};
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* A widget for the footer for the default view, allowing to switch views
*
mw.rcfilters.ui.ViewSwitchWidget.prototype.onButtonClick = function ( buttonWidget ) {
this.controller.switchView( buttonWidget.getData() );
};
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
/**
* Top section (between page title and filters) on Special:Watchlist
*
/* Initialization */
OO.inheritClass( mw.rcfilters.ui.WatchlistTopSectionWidget, OO.ui.Widget );
-}( mediaWiki ) );
+}() );
/*!
* Add search suggestions to the search form.
*/
-( function ( mw, $ ) {
+( function () {
var searchNS = $.map( mw.config.get( 'wgFormattedNamespaces' ), function ( nsName, nsID ) {
if ( nsID >= 0 && mw.user.options.get( 'searchNs' + nsID ) ) {
// Cast string key to number
.find( '.mw-fallbackSearchButton' ).remove();
} );
-}( mediaWiki, jQuery ) );
+}() );
/* eslint-disable no-restricted-properties */
-( function ( $, mw, OO ) {
+( function () {
'use strict';
var ApiSandbox, Util, WidgetMethods, Validators,
$content, panel, booklet, oldhash, windowManager,
module.exports = ApiSandbox;
-}( jQuery, mediaWiki, OO ) );
+}() );
/*!
* JavaScript for Special:Block
*/
-( function ( mw, $ ) {
+( function () {
// Like OO.ui.infuse(), but if the element doesn't exist, return null instead of throwing an exception.
function infuseOrNull( elem ) {
try {
updateBlockOptions();
}
} );
-}( mediaWiki, jQuery ) );
+}() );
/*!
* JavaScript for change credentials form.
*/
-( function ( mw, $, OO ) {
+( function () {
mw.hook( 'htmlform.enhance' ).add( function ( $root ) {
var api = new mw.Api();
} );
} );
} );
-}( mediaWiki, jQuery, OO ) );
+}() );
*/
/* Remember the collapse state of the legend on recent changes and watchlist pages. */
-( function ( mw ) {
+( function () {
var
cookieName = 'changeslist-state',
// Expanded by default
};
mw.hook( 'wikipage.content' ).add( doCollapsibleLegend );
-}( mediaWiki ) );
+}() );
-( function ( mw, $ ) {
+( function () {
// Return a promise that is resolved when the element is blurred (loses focus).
// If it already is blurred, resolved immediately.
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
/*!
* JavaScript for Special:EditTags
*/
-( function ( mw, $ ) {
+( function () {
$( function () {
var summaryCodePointLimit = mw.config.get( 'wgCommentCodePointLimit' ),
summaryByteLimit = mw.config.get( 'wgCommentByteLimit' ),
}
} );
-}( mediaWiki, jQuery ) );
+}() );
/*!
* JavaScript for Special:Import
*/
-( function ( $ ) {
+( function () {
var subprojectListAlreadyShown;
function updateImportSubprojectList() {
var $projectField = $( '#mw-import-table-interwiki #interwiki' ),
updateImportSubprojectList();
}
} );
-}( jQuery ) );
+}() );
/*!
* JavaScript for Special:MovePage
*/
-( function ( mw, $ ) {
+( function () {
$( function () {
var summaryCodePointLimit = mw.config.get( 'wgCommentCodePointLimit' ),
summaryByteLimit = mw.config.get( 'wgCommentByteLimit' ),
mw.widgets.visibleByteLimit( wpReason, summaryByteLimit );
}
} );
-}( mediaWiki, jQuery ) );
+}() );
/*!
* JavaScript module used on Special:PageLanguage
*/
-( function ( $, OO ) {
+( function () {
$( function () {
// Select the 'Language select' option if user is trying to select language
OO.ui.infuse( 'mw-pl-languageselector' ).on( 'change', function () {
OO.ui.infuse( 'mw-pl-options' ).setValue( '2' );
} );
} );
-}( jQuery, OO ) );
+}() );
/*!
* JavaScript for Special:Preferences: editfont field enhancements.
*/
-( function ( mw ) {
+( function () {
mw.hook( 'htmlform.enhance' ).add( function ( $root ) {
var widget, lastValue,
$target = $root.find( '#mw-input-wpeditfont' );
updateLabel( widget.getValue() );
} );
-}( mediaWiki ) );
+}() );
/*!
* JavaScript for Special:Preferences: Tab navigation.
*/
-( function ( mw, $ ) {
+( function () {
$( function () {
var $preferences, tabs, wrapper, previousTab, switchingNoHash;
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
* JavaScript for Special:Preferences: Enable save button and prevent the window being accidentally
* closed when any form field is changed.
*/
-( function ( mw, $ ) {
+( function () {
$( function () {
var allowCloseWindow, saveButton, restoreButton,
oouiEnabled = $( '#mw-prefs-form' ).hasClass( 'mw-htmlform-ooui' );
$( '#mw-prefs-restoreprefs' ).on( 'click', allowCloseWindow.release );
}
} );
-}( mediaWiki, jQuery ) );
+}() );
/*!
* JavaScript for Special:Preferences: Check for successbox to replace with notifications.
*/
-( function ( $ ) {
+( function () {
$( function () {
var convertmessagebox = require( 'mediawiki.notification.convertmessagebox' );
convertmessagebox();
} );
-}( jQuery ) );
+}() );
/*!
* JavaScript for Special:Preferences: Email preferences better UX
*/
-( function ( $ ) {
+( function () {
$( function () {
var allowEmail, allowEmailFromNewUsers;
toggleDisabled();
}
} );
-}( jQuery ) );
+}() );
/*!
* JavaScript for Special:Preferences: Tab navigation.
*/
-( function ( mw, $ ) {
+( function () {
$( function () {
var $preftoc, $preferences, $fieldsets, labelFunc, previousTab;
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
/*!
* JavaScript for Special:Preferences: Timezone field enhancements.
*/
-( function ( mw, $ ) {
+( function () {
mw.hook( 'htmlform.enhance' ).add( function ( $root ) {
var $tzSelect, $tzTextbox, timezoneWidget, $localtimeHolder, servertime,
$target = $root.find( '#wpTimeCorrection' ),
}
} );
-}( mediaWiki, jQuery ) );
+}() );
/*!
* JavaScript for Special:RecentChanges
*/
-( function ( mw, $ ) {
+( function () {
var rc, $checkboxes, $select;
/**
module.exports = rc;
-}( mediaWiki, jQuery ) );
+}() );
/*!
* JavaScript for Special:RevisionDelete
*/
-( function ( mw, $ ) {
+( function () {
var colonSeparator = mw.message( 'colon-separator' ).text(),
summaryCodePointLimit = mw.config.get( 'wgCommentCodePointLimit' ),
summaryByteLimit = mw.config.get( 'wgCommentByteLimit' ),
$wpReason.byteLimit( summaryByteLimit, filterFn );
}
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw, $ ) {
+( function () {
var api = new mw.Api(),
pageUrl = new mw.Uri(),
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
/*!
* JavaScript for Special:Search
*/
-( function ( mw, $ ) {
+( function () {
$( function () {
var $checkboxes, $headerLinks, updateHeaderLinks, searchWidget;
} );
-}( mediaWiki, jQuery ) );
+}() );
/*!
* JavaScript for Special:Undelete
*/
-( function ( mw, $ ) {
+( function () {
$( function () {
var summaryCodePointLimit = mw.config.get( 'wgCommentCodePointLimit' ),
summaryByteLimit = mw.config.get( 'wgCommentByteLimit' ),
mw.widgets.visibleByteLimit( wpComment, summaryByteLimit );
}
} );
-}( mediaWiki, jQuery ) );
+}() );
/*!
* JavaScript for Special:UnwatchedPages
*/
-( function ( mw, $ ) {
+( function () {
$( function () {
$( 'a.mw-watch-link' ).click( function ( e ) {
var promise,
e.preventDefault();
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
/* global Uint8Array */
-( function ( mw, $ ) {
+( function () {
var uploadWarning, uploadTemplatePreview,
ajaxUploadDestCheck = mw.config.get( 'wgAjaxUploadDestCheck' ),
$license = $( '#wpLicense' );
$( '.mw-editTools' ).attr( 'tabindex', '0' );
setEditTabindex( '-1' );
} );
-}( mediaWiki, jQuery ) );
+}() );
/*!
* JavaScript for signup form.
*/
-( function ( mw, $ ) {
+( function () {
// When sending password by email, hide the password input fields.
$( function () {
// Always required if checked, otherwise it depends, so we use the original
passwordChecker = new mw.htmlform.Checker( $passwordInput, checkPassword );
passwordChecker.attach( $usernameInput.add( $emailInput ).add( $realNameInput ) );
} );
-}( mediaWiki, jQuery ) );
+}() );
/*!
* JavaScript for Special:UserRights
*/
-( function ( mw, $ ) {
+( function () {
var convertmessagebox = require( 'mediawiki.notification.convertmessagebox' ),
summaryCodePointLimit = mw.config.get( 'wgCommentCodePointLimit' ),
summaryByteLimit = mw.config.get( 'wgCommentByteLimit' ),
$wpReason.byteLimit( summaryByteLimit );
}
-}( mediaWiki, jQuery ) );
+}() );
/*!
* JavaScript for Special:Watchlist
*/
-( function ( $ ) {
+( function () {
$( function () {
$( '.mw-changeslist-line-watched .mw-title a' ).on( 'click', function () {
$( this )
.removeClass( 'mw-changeslist-line-watched' );
} );
} );
-}( jQuery ) );
+}() );
/*!
* JavaScript for Special:Watchlist
*/
-( function ( mw, $, OO ) {
+( function () {
$( function () {
var api = new mw.Api(), $progressBar, $resetForm = $( '#mw-watchlist-resetbutton' );
}
} );
-}( mediaWiki, jQuery, OO )
-);
+}() );
-( function ( mw ) {
+( function () {
'use strict';
// Catch exceptions to avoid fatal in Chrome's "Block data storage" mode
*/
mw.storage.session = new SafeStorage( sessionStorage );
-}( mediaWiki ) );
+}() );
* @class mw.template
* @singleton
*/
-( function ( mw, $ ) {
+( function () {
var compiledTemplates = {},
compilers = {};
}
} );
-}( mediaWiki, jQuery ) );
+}() );
/* global Mustache */
-( function ( mw, $ ) {
+( function () {
// Register mustache compiler
mw.template.registerCompiler( 'mustache', {
compile: function ( src ) {
}
} );
-}( mediaWiki, jQuery ) );
+}() );
-mediaWiki.template.registerCompiler( 'regexp', {
+mw.template.registerCompiler( 'regexp', {
compile: function ( src ) {
return {
render: function () {
-( function ( mw, $ ) {
+( function () {
'use strict';
// Table of contents toggle
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
* @class mw.toolbar
* @singleton
*/
-( function ( mw, $ ) {
+( function () {
var toolbar, isReady, $toolbar, queue, slice, $currentFocused;
/**
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
* @singleton
*/
/* global Uint16Array */
-( function ( mw, $ ) {
+( function () {
var userInfoPromise, pageviewRandomId;
/**
*/
mw.log.deprecate( mw.user, 'stickyRandomId', mw.user.getPageviewToken, 'Please use getPageviewToken instead' );
-}( mediaWiki, jQuery ) );
+}() );
/*!
* Add autocomplete suggestions for names of registered users.
*/
-( function ( mw, $ ) {
+( function () {
var api, config;
config = {
$( function () {
$( '.mw-autocomplete-user' ).suggestions( config );
} );
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw, $ ) {
+( function () {
'use strict';
var util;
mw.util = util;
module.exports = util;
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw, $ ) {
+( function () {
'use strict';
/**
};
mw.viewport = viewport;
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw, document ) {
+( function () {
var hidden, visibilityChange,
nextVisibleTimeoutId = 0,
activeTimeouts = {},
+ document = window.document,
init = function ( overrideDoc ) {
if ( overrideDoc !== undefined ) {
document = overrideDoc;
module.exports.setDocument = init;
}
-}( mediaWiki, document ) );
+}() );
-( function ( $, mw ) {
+( function () {
/**
* CalendarWidget displays a calendar that can be used to select a date. It
return this;
};
-}( jQuery, mediaWiki ) );
+}() );
/* eslint-disable no-restricted-properties */
-( function ( $, mw ) {
+( function () {
/**
* Provides various methods needed for formatting dates and times.
};
};
-}( jQuery, mediaWiki ) );
+}() );
-( function ( $, mw ) {
+( function () {
/**
* DateTimeInputWidgets can be used to input a date, a time, or a date and
this.focus();
};
-}( jQuery, mediaWiki ) );
+}() );
/* eslint-disable no-restricted-properties */
-( function ( $, mw ) {
+( function () {
/**
* Provides various methods needed for formatting dates and times. This
return ret;
};
-}( jQuery, mediaWiki ) );
+}() );
/* eslint-disable no-restricted-properties */
-( function ( $, mw ) {
+( function () {
/**
* Provides various methods needed for formatting dates and times. This
return ret;
};
-}( jQuery, mediaWiki ) );
+}() );
// Create the namespace object
-mediaWiki.widgets.datetime = {};
+mw.widgets.datetime = {};
-( function ( mw ) {
+( function () {
var byteLength = require( 'mediawiki.String' ).byteLength,
codePointLength = require( 'mediawiki.String' ).codePointLength;
textInputWidget.$input.codePointLimit( limit );
};
-}( mediaWiki ) );
+}() );
*
* @copyright 2011-2016 VisualEditor Team and others; see http://ve.mit-license.org
*/
-( function ( $, mw ) {
+( function () {
/**
* API Results Provider object.
mw.widgets.APIResultsProvider.prototype.setAjaxSettings = function ( settings ) {
this.ajaxSettings = settings;
};
-}( jQuery, mediaWiki ) );
+}() );
*
* @copyright 2011-2016 VisualEditor Team and others; see http://ve.mit-license.org
*/
-( function ( $, mw ) {
+( function () {
/**
* API Results Queue object.
mw.widgets.APIResultsQueue.prototype.getThreshold = function () {
return this.threshold;
};
-}( jQuery, mediaWiki ) );
+}() );
* @copyright 2011-2016 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
-( function ( $, mw ) {
+( function () {
/**
* MediaWiki media resource provider.
this.apiurl !== undefined ||
this.scriptDirUrl !== undefined;
};
-}( jQuery, mediaWiki ) );
+}() );
* @copyright 2011-2016 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
-( function ( $, mw ) {
+( function () {
/**
* MediaWiki media resource queue.
mw.widgets.MediaResourceQueue.prototype.getMaxHeight = function () {
return this.maxHeight;
};
-}( jQuery, mediaWiki ) );
+}() );
* @copyright 2011-2016 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
-( function ( $, mw ) {
+( function () {
/**
* Creates an mw.widgets.MediaResultWidget object.
mw.widgets.MediaResultWidget.prototype.hasSrc = function () {
return !!this.src;
};
-}( jQuery, mediaWiki ) );
+}() );
* @copyright 2011-2016 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
-( function ( $, mw ) {
+( function () {
/**
* MediaWiki media search provider.
mw.widgets.MediaSearchProvider.prototype.isValid = function () {
return this.getUserParams().gsrsearch && mw.widgets.MediaSearchProvider.super.prototype.isValid.call( this );
};
-}( jQuery, mediaWiki ) );
+}() );
* @copyright 2011-2016 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
-( function ( mw ) {
+( function () {
/**
* MediaWiki media resource queue.
mw.widgets.MediaSearchQueue.prototype.getSearchQuery = function () {
return this.getParams().gsrsearch;
};
-}( mediaWiki ) );
+}() );
* @copyright 2011-2016 VisualEditor Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
-( function ( $, mw ) {
+( function () {
/**
* Creates an mw.widgets.MediaSearchWidget object.
mw.widgets.MediaSearchWidget.prototype.getLang = function () {
return this.lang;
};
-}( jQuery, mediaWiki ) );
+}() );
* @license The MIT License (MIT); see LICENSE.txt
*/
/* global moment */
-( function ( $, mw ) {
+( function () {
/**
* Creates an mw.widgets.CalendarWidget object.
return this;
};
-}( jQuery, mediaWiki ) );
+}() );
* @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
-( function ( $, mw ) {
+( function () {
var hasOwn = Object.prototype.hasOwnProperty,
NS_CATEGORY = mw.config.get( 'wgNamespaceIds' ).category;
/** Search only parent categories */
ParentCategories: 4
};
-}( jQuery, mediaWiki ) );
+}() );
* @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
-( function ( $, mw ) {
+( function () {
var hasOwn = Object.prototype.hasOwnProperty;
// For backwards compatibility. See T183299.
mw.widgets.CategoryCapsuleItemWidget = mw.widgets.CategoryTagItemWidget;
-}( jQuery, mediaWiki ) );
+}() );
-( function ( $, mw ) {
+( function () {
/**
* A JavaScript version of CheckMatrixWidget.
*
} );
}
};
-}( jQuery, mediaWiki ) );
+}() );
* @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
-( function ( $, mw ) {
+( function () {
/**
* Namespace input widget. Displays a dropdown box with the choice of available namespaces, plus
return this;
};
-}( jQuery, mediaWiki ) );
+}() );
* @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
-( function ( $, mw ) {
+( function () {
/**
* Like TitleInputWidget, but the namespace has to be input through a separate dropdown field.
return this;
};
-}( jQuery, mediaWiki ) );
+}() );
* @license The MIT License (MIT); see LICENSE.txt
*/
/* global moment */
-( function ( $, mw ) {
+( function () {
/**
* Creates an mw.widgets.DateInputWidget object.
}
};
-}( jQuery, mediaWiki ) );
+}() );
* @license The MIT License (MIT); see LICENSE.txt
*/
/* global moment */
-( function ( $, mw ) {
+( function () {
/**
* Creates a mw.widgets.ExpiryWidget object.
return this.relativeField.getValue();
};
-}( jQuery, mediaWiki ) );
+}() );
* @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
-( function ( $, mw ) {
+( function () {
/**
* Namespace input widget. Displays a dropdown box with the choice of available namespaces.
return options;
};
-}( jQuery, mediaWiki ) );
+}() );
* @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
-( function ( $, mw ) {
+( function () {
/**
* Creates a mw.widgets.SearchInputWidget object.
return items;
};
-}( jQuery, mediaWiki ) );
+}() );
* @copyright 2011-2017 MediaWiki Widgets Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
-( function ( $, mw ) {
+( function () {
/**
* Select with input widget. Displays an OO.ui.TextInputWidget along with
this.emit( 'change', this.getValue() );
};
-}( jQuery, mediaWiki ) );
+}() );
* @copyright 2011-2018 MediaWiki Widgets Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
-( function ( $, mw ) {
+( function () {
/**
* RadioSelectInputWidget and a TextInputWidget to set minimum or maximum byte size
this.textinput.restorePreInfuseState( state.textinput );
};
-}( jQuery, mediaWiki ) );
+}() );
* @copyright 2011-2016 MediaWiki Widgets Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
-( function ( $, mw, OO ) {
+( function () {
/**
* Accepts a stashed file and displays the information for purposes of
return $.Deferred().reject( 'No filekey' );
};
-}( jQuery, mediaWiki, OO ) );
+}() );
* @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
-( function ( $, mw ) {
+( function () {
var trimByteLength = require( 'mediawiki.String' ).trimByteLength;
} ).newVal;
};
-}( jQuery, mediaWiki ) );
+}() );
* @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
-( function ( $, mw ) {
+( function () {
/**
* Creates a mw.widgets.TitleOptionWidget object.
OO.inheritClass( mw.widgets.TitleOptionWidget, OO.ui.MenuOptionWidget );
-}( jQuery, mediaWiki ) );
+}() );
* @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
-( function ( mw ) {
+( function () {
/**
* Creates an mw.widgets.TitleSearchWidget object.
return response.query || {};
};
-}( mediaWiki ) );
+}() );
* @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
-( function ( $, mw ) {
+( function () {
var hasOwn = Object.prototype.hasOwnProperty;
/**
return !!this.getMWTitle();
};
-}( jQuery, mediaWiki ) );
+}() );
* @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
-( function ( $, mw ) {
+( function () {
/**
* Creates a mw.widgets.UserInputWidget object.
return items;
};
-}( jQuery, mediaWiki ) );
+}() );
* @copyright 2017 MediaWiki Widgets Team and others; see AUTHORS.txt
* @license The MIT License (MIT); see LICENSE.txt
*/
-( function ( $, mw ) {
+( function () {
/**
* UsersMultiselectWidget can be used to input list of users in a single
this.input.setValue( '' );
};
-}( jQuery, mediaWiki ) );
+}() );
-/* global mediaWiki, moment */
+/* global moment */
-( function ( mw ) {
+( function () {
// HACK: Overwrite moment's i18n with MediaWiki's for the current language so that
// wgTranslateNumerals is respected.
moment.updateLocale( moment.locale(), {
return s;
}
} );
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
var isMobile;
// Connect OOUI to MediaWiki's localisation system
OO.ui.getUserLanguages = mw.language.getFallbackLanguageChain;
}
return isMobile;
};
-}( mediaWiki ) );
+}() );
-mediaWiki.loader.testCallback();
+mw.loader.testCallback();
/* global sinon */
-( function ( $, mw, QUnit ) {
+( function () {
'use strict';
var addons, nested;
} );
} );
-}( jQuery, mediaWiki, QUnit ) );
+}() );
-( function ( $ ) {
+( function () {
var getAccessKeyPrefixTestData, updateTooltipAccessKeysTestData;
QUnit.module( 'jquery.accessKeyLabel', QUnit.newMwEnvironment( {
$.fn.updateTooltipAccessKeys.setTestMode( false );
} );
-}( jQuery ) );
+}() );
-( function ( $ ) {
+( function () {
QUnit.module( 'jquery.color', QUnit.newMwEnvironment() );
QUnit.test( 'animate', function ( assert ) {
} )
.always( done );
} );
-}( jQuery ) );
+}() );
-( function ( $ ) {
+( function () {
QUnit.module( 'jquery.colorUtil', QUnit.newMwEnvironment() );
QUnit.test( 'getRGB', function ( assert ) {
b = $.colorUtil.getColorBrightness( 'rgb(200,50,50)', -0.2 );
assert.strictEqual( b, 'rgb(118,29,29)', 'Start with rgb string "rgb(200,50,50)", darken 20%' );
} );
-}( jQuery ) );
+}() );
-( function ( $ ) {
+( function () {
QUnit.module( 'jquery.getAttrs', QUnit.newMwEnvironment() );
QUnit.test( 'getAttrs()', function ( assert ) {
assert.propEqual( $el.getAttrs(), attrs, 'keys and values match' );
} );
-}( jQuery ) );
+}() );
-( function ( $ ) {
+( function () {
QUnit.module( 'jquery.hidpi', QUnit.newMwEnvironment() );
QUnit.test( 'devicePixelRatio', function ( assert ) {
assert.strictEqual( $.matchSrcSet( 1.75, srcset ), 'onefive.png', '1.75 gives match to 1.5' );
assert.strictEqual( $.matchSrcSet( 2.25, srcset ), 'two.png', '2.25 gives match to 2' );
} );
-}( jQuery ) );
+}() );
-( function ( $ ) {
+( function () {
QUnit.module( 'jquery.highlightText', QUnit.newMwEnvironment() );
QUnit.test( 'Check', function ( assert ) {
);
} );
} );
-}( jQuery ) );
+}() );
-( function ( $, mw ) {
+( function () {
var simpleSample, U_20AC, poop, mbSample;
QUnit.module( 'jquery.lengthLimit', QUnit.newMwEnvironment() );
expected: '\uD800'
} );
-}( jQuery, mediaWiki ) );
+}() );
-( function ( $, mw ) {
+( function () {
QUnit.module( 'jquery.localize', QUnit.newMwEnvironment() );
QUnit.test( 'Handle basic replacements', function ( assert ) {
assert.strictEqual( $lc.length, 1, 'link is created' );
assert.strictEqual( $lc.text(), 'link', 'the link text got added' );
} );
-}( jQuery, mediaWiki ) );
+}() );
-( function ( $ ) {
+( function () {
var loremIpsum = 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit.';
QUnit.module( 'jquery.makeCollapsible', QUnit.newMwEnvironment() );
assert.assertFalse( $collapsible2.find( '> .mw-collapsible-toggle' ).hasClass( 'mw-collapsible-toggle-collapsed' ) );
} ).find( '> .mw-collapsible-toggle a' ).trigger( 'click' );
} );
-}( jQuery ) );
+}() );
-( function ( $ ) {
+( function () {
QUnit.module( 'jquery.tabIndex', QUnit.newMwEnvironment() );
QUnit.test( 'firstTabIndex', function ( assert ) {
$testB = $( '<div>' );
assert.strictEqual( $testB.lastTabIndex(), null, 'Return null if none available.' );
} );
-}( jQuery ) );
+}() );
-( function ( $, mw ) {
+( function () {
/**
* This module tests the input/output capabilities of the parsers of tablesorter.
* It does not test actual sorting.
// TODO add numbers sorting tests for T10115 with a different language
-}( jQuery, mediaWiki ) );
+}() );
-( function ( $, mw ) {
+( function () {
var header = [ 'Planet', 'Radius (km)' ],
// Data set "planets"
);
} );
-}( jQuery, mediaWiki ) );
+}() );
-( function ( $ ) {
+( function () {
var caretSample,
sig = {
pre: '--~~~~'
end: 11,
mode: 'set'
} );
-}( jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
QUnit.module( 'mediawiki.ForeignApi', QUnit.newMwEnvironment( {
setup: function () {
this.server = this.sandbox.useFakeServer();
return api.post( {} );
} );
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
QUnit.module( 'mediawiki.api.category', QUnit.newMwEnvironment( {
setup: function () {
this.server = this.sandbox.useFakeServer();
} );
} );
-}( mediaWiki ) );
+}() );
-( function ( mw, $ ) {
+( function () {
QUnit.module( 'mediawiki.api.edit', QUnit.newMwEnvironment( {
setup: function () {
this.server = this.sandbox.useFakeServer();
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
QUnit.module( 'mediawiki.api.messages', QUnit.newMwEnvironment( {
setup: function () {
this.server = this.sandbox.useFakeServer();
);
} );
} );
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
QUnit.module( 'mediawiki.api.options', QUnit.newMwEnvironment( {
setup: function () {
this.server = this.sandbox.useFakeServer();
} )
);
} );
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
QUnit.module( 'mediawiki.api.parse', QUnit.newMwEnvironment( {
setup: function () {
this.server = this.sandbox.useFakeServer();
assert.strictEqual( html, '<p><b>Earth</b> is a planet.</p>', 'Parse page by Title object' );
} );
} );
-}( mediaWiki ) );
+}() );
-( function ( mw, $ ) {
+( function () {
QUnit.module( 'mediawiki.api', QUnit.newMwEnvironment( {
setup: function () {
this.server = this.sandbox.useFakeServer();
var self = this,
requests = this.requests = [];
this.api = new mw.Api();
- this.sandbox.stub( jQuery, 'ajax', function () {
+ this.sandbox.stub( $, 'ajax', function () {
var request = $.extend( {
abort: self.sandbox.spy()
}, $.Deferred() );
assert.ok( request.abort.calledOnce, 'abort request number ' + i );
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw, $ ) {
+( function () {
QUnit.module( 'mediawiki.api.upload', QUnit.newMwEnvironment( {} ) );
QUnit.test( 'Basic functionality', function ( assert ) {
assert.strictEqual( $input.val(), 'Testing API upload.jpg', 'input value' );
} );
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
QUnit.module( 'mediawiki.api.watch', QUnit.newMwEnvironment( {
setup: function () {
this.server = this.sandbox.useFakeServer();
} );
} );
-}( mediaWiki ) );
+}() );
/* eslint-disable camelcase */
/* eslint no-underscore-dangle: "off" */
-( function ( mw, $ ) {
+( function () {
var mockFilterStructure = [ {
name: 'group1',
title: 'Group 1',
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
/* eslint-disable camelcase */
-( function ( mw ) {
+( function () {
QUnit.module( 'mediawiki.rcfilters - FilterItem' );
QUnit.test( 'Initializing filter item', function ( assert ) {
assert.strictEqual( item.getValue(), '1', 'Value is kept as-is' );
} );
-}( mediaWiki ) );
+}() );
/* eslint-disable camelcase */
-( function ( mw, $ ) {
+( function () {
var filterDefinition = [ {
name: 'group1',
type: 'send_unselected_if_any',
} );
assert.strictEqual( model.areVisibleFiltersEmpty(), false );
} );
-}( mediaWiki, jQuery ) );
+}() );
/* eslint-disable camelcase */
-( function ( mw ) {
+( function () {
var filterDefinition = [ {
name: 'group1',
type: 'send_unselected_if_any',
'Invert parameter saved if there are namespaces.'
);
} );
-}( mediaWiki ) );
+}() );
/* eslint-disable camelcase */
-( function ( mw ) {
+( function () {
var itemData = {
params: {
param1: '1',
'Default state represented when item initialized with default:true.'
);
} );
-}( mediaWiki ) );
+}() );
-( function ( $ ) {
+( function () {
QUnit.module( 'mediawiki.special.recentchanges', QUnit.newMwEnvironment() );
// TODO: verify checkboxes == [ 'nsassociated', 'nsinvert' ]
// DOM cleanup
$env.remove();
} );
-}( jQuery ) );
+}() );
QUnit.module( 'mediawiki.widgets.APIResultsQueue' );
-( function ( $, mw ) {
+( function () {
var itemCounter, FullResourceProvider, EmptyResourceProvider, SingleResultResourceProvider;
itemCounter = 0;
// Finish the async test
.then( done );
} );
-}( jQuery, mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
QUnit.module( 'mediawiki.RegExp' );
QUnit.test( 'escape', function ( assert ) {
assert.strictEqual( mw.RegExp.escape( normal ), normal, 'Alphanumerals are left alone' );
} );
-}( mediaWiki ) );
+}() );
-( function ( $, mw ) {
+( function () {
var simpleSample, U_20AC, poop, mbSample,
trimByteLength = require( 'mediawiki.String' ).trimByteLength;
expected: '\uD800'
} );
-}( jQuery, mediaWiki ) );
+}() );
-( function ( mw, $ ) {
+( function () {
/* eslint-disable camelcase */
var repeat = function ( input, multiplier ) {
return new Array( multiplier + 1 ).join( input );
}
} );
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
QUnit.module( 'mediawiki.Uri', QUnit.newMwEnvironment( {
setup: function () {
this.mwUriOrg = mw.Uri;
href = uri.toString();
assert.strictEqual( href, testProtocol + testServer + ':' + testPort + testPath, 'Root-relative URL gets host, protocol, and port supplied' );
} );
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
QUnit.module( 'mediawiki.base' );
QUnit.test( 'mw.hook - basic', function ( assert ) {
} ] );
} );
-}( mediaWiki ) );
+}() );
-( function ( mw, $ ) {
+( function () {
var pluralTestcases = {
/*
* Sample:
pluralTest( langCode, tests );
}
} );
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw, $ ) {
+( function () {
var NOW = 9012, // miliseconds
DEFAULT_DURATION = 5678, // seconds
assert.strictEqual( key, 'barfoo' );
} );
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
QUnit.module( 'mediawiki.errorLogger', QUnit.newMwEnvironment() );
QUnit.test( 'installGlobalHandler', function ( assert ) {
assert.strictEqual( w.onerror( errorMessage, errorUrl, errorLine ), true,
'Global handler preserves true return from previous handler' );
} );
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
var getBucket = mw.experiments.getBucket;
);
} );
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
QUnit.module( 'mediawiki.html' );
QUnit.test( 'escape', function ( assert ) {
);
} );
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
QUnit.module( 'mediawiki.inspect' );
);
} );
} );
-}( mediaWiki ) );
+}() );
-( function ( mw, $ ) {
+( function () {
/* eslint-disable camelcase */
var formatText, formatParse, formatnumTests, specialCharactersPageName, expectedListUsers,
expectedListUsersSitename, expectedLinkPagenamee, expectedEntrypoints,
'setParserDefaults is deep if requested'
);
} );
-}( mediaWiki, jQuery ) );
+}() );
* Some misc JavaScript compatibility tests,
* just to make sure the environments we run in are consistent.
*/
-( function ( $ ) {
+( function () {
QUnit.module( 'mediawiki.jscompat', QUnit.newMwEnvironment() );
QUnit.test( 'Variable with Unicode letter in name', function ( assert ) {
assert.strictEqual( $textarea.val(), expected, 'Expecting ' + n + ' newlines (from DOM set with ' + n + ')' );
}
} );
-}( jQuery ) );
+}() );
-( function ( mw, $ ) {
+( function () {
'use strict';
var grammarTests, bcp47Tests;
assert.strictEqual( mw.language.bcp47( input ), expected );
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw, $ ) {
+( function () {
QUnit.module( 'mediawiki.loader', QUnit.newMwEnvironment( {
setup: function ( assert ) {
// Expose for load.mock.php
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
var TEST_MODEL = 'test-content-model';
QUnit.module( 'mediawiki.messagePoster', QUnit.newMwEnvironment( {
'Throws exception is same model is registered a second time'
);
} );
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
QUnit.module( 'mediawiki.requestIdleCallback', QUnit.newMwEnvironment( {
setup: function () {
var clock = this.clock = this.sandbox.useFakeTimers();
} );
}
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
QUnit.module( 'mediawiki.storage' );
QUnit.test( 'set/get with storage support', function ( assert ) {
mw.storage.store = old;
} );
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
QUnit.module( 'mediawiki.template.mustache', {
beforeEach: function () {
assert.strictEqual( htmlPartial, 'Hello goodbye', 'Render with partial' );
} );
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
QUnit.module( 'mediawiki.template', {
beforeEach: function () {
);
} );
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
var specialCharactersPageName,
// Can't mock SITENAME since jqueryMsg caches it at load
siteName = mw.config.get( 'wgSiteName' );
assert.strictEqual( mw.msg( 'int-msg' ), 'Some Other Message', 'int is resolved' );
} );
-}( mediaWiki ) );
+}() );
-( function ( mw, $ ) {
+( function () {
QUnit.module( 'mediawiki.toc', QUnit.newMwEnvironment( {
setup: function () {
// Prevent live cookies from interferring with the test
return $tocList.promise();
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
QUnit.module( 'mediawiki.track' );
QUnit.test( 'track', function ( assert ) {
[ 'unsub', { key: 2 } ]
], 'Stop when unsubscribing' );
} );
-}( mediaWiki ) );
+}() );
-( function ( mw ) {
+( function () {
QUnit.module( 'mediawiki.user', QUnit.newMwEnvironment( {
setup: function () {
this.server = this.sandbox.useFakeServer();
assert.strictEqual( result.trim(), result, 'no leading or trailing whitespace' );
assert.strictEqual( result2, result, 'retained' );
} );
-}( mediaWiki ) );
+}() );
-( function ( mw, $ ) {
+( function () {
var util = require( 'mediawiki.util' ),
// Based on IPTest.php > testisIPv4
IPV4_CASES = [
} );
QUnit.test( '$content', function ( assert ) {
- assert.ok( util.$content instanceof jQuery, 'mw.util.$content instance of jQuery' );
+ assert.ok( util.$content instanceof $, 'mw.util.$content instance of jQuery' );
assert.strictEqual( util.$content.length, 1, 'mw.util.$content must have length of 1' );
} );
assert.strictEqual( util.isIPv6Address( ipCase[ 1 ] ), ipCase[ 0 ], ipCase[ 2 ] );
} );
} );
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw, $ ) {
+( function () {
// Simulate square element with 20px long edges placed at (20, 20) on the page
var
'It should default to a threshold of 50px and the window\'s viewport' );
} );
-}( mediaWiki, jQuery ) );
+}() );
-( function ( mw ) {
+( function () {
QUnit.module( 'mediawiki.visibleTimeout', QUnit.newMwEnvironment( {
setup: function () {
this.sandbox.clock.tick( 50 );
assert.strictEqual( called, 1 );
} );
-}( mediaWiki ) );
+}() );