* SpecialPrefixindex methods namespacePrefixForm() and showPrefixChunk() have
been made protected. They were accepting form variance arguments, this is now
using properties in the SpecialPrefixindex class.
+* (bug 50310) BREAKING CHANGE: wikibits: Drop support for mwCustomEditButtons.
+ It defaults to an empty array and emits mw.log.warn when accessed.
== Compatibility ==
'scripts' => 'resources/mediawiki.action/mediawiki.action.edit.js',
'dependencies' => array(
'mediawiki.action.edit.styles',
- 'mediawiki.legacy.wikibits',
'jquery.textSelection',
'jquery.byteLimit',
),
mw.toolbar = toolbar;
$( function () {
- var buttons, i, b, $iframe, editBox, scrollTop, $editForm;
+ var i, b, $iframe, editBox, scrollTop, $editForm;
// currentFocus is used to determine where to insert tags
$currentFocused = $( '#wpTextbox1' );
// Populate the selector cache for $toolbar
$toolbar = $( '#toolbar' );
- // Legacy: Merge buttons from mwCustomEditButtons
- buttons = [].concat( queue, window.mwCustomEditButtons );
- // Clear queue
- queue.length = 0;
-
- for ( i = 0; i < buttons.length; i++ ) {
- b = buttons[i];
+ for ( i = 0; i < queue.length; i++ ) {
+ b = queue[i];
if ( $.isArray( b ) ) {
// Forwarded arguments array from mw.toolbar.addButton
insertButton.apply( toolbar, b );
} else {
- // Raw object from mw.toolbar.addButtons or mwCustomEditButtons
+ // Raw object from mw.toolbar.addButtons
insertButton( b );
}
}
+ // Clear queue
+ queue.length = 0;
+
// This causes further calls to addButton to go to insertion directly
// instead of to the queue.
// It is important that this is after the one and only loop through
};
window.mwEditButtons = [];
-window.mwCustomEditButtons = []; // eg to add in MediaWiki:Common.js
+mw.log.deprecate( window, 'mwCustomEditButtons', [], 'Use mw.toolbar.addButton instead.' );
window.escapeQuotes = function( text ) {
var re = new RegExp( "'", "g" );