Make mwCustomEditButtons a no-op and mark it as deprecated
[lhc/web/wiklou.git] / resources / mediawiki.action / mediawiki.action.edit.js
index 38d4bb8..ba711aa 100644 (file)
        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