Merge "eslint: Turn on reportUnusedDisableDirectives"
[lhc/web/wiklou.git] / resources / src / mediawiki.widgets / mw.widgets.CategoryTagItemWidget.js
index f0b2d44..a15337c 100644 (file)
@@ -4,7 +4,7 @@
  * @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;
 
                        var
                                normalized = {},
                                pages = {};
-                       $.each( response.query.normalized || [], function ( index, data ) {
+                       ( response.query.normalized || [] ).forEach( function ( data ) {
                                normalized[ data.fromencoded ? decodeURIComponent( data.from ) : data.from ] = data.to;
                        } );
-                       $.each( response.query.pages, function ( index, page ) {
+                       response.query.pages.forEach( function ( page ) {
                                pages[ page.title ] = !page.missing;
                        } );
                        titles.forEach( function ( title ) {
        };
 
        /**
-        * Category selector capsule item widget. Extends OO.ui.CapsuleItemWidget with the ability to link
+        * Category selector tag item widget. Extends OO.ui.TagItemWidget with the ability to link
         * to the given page, and to show its existence status (i.e., whether it is a redlink).
         *
         * @class mw.widgets.CategoryTagItemWidget
                                .addClass( 'new' );
                }
        };
-
-       // For backwards compatibility. See T183299.
-       mw.widgets.CategoryCapsuleItemWidget = mw.widgets.CategoryTagItemWidget;
-}( jQuery, mediaWiki ) );
+}() );