resources: Strip '$' and 'mw' from file closures
[lhc/web/wiklou.git] / resources / src / mediawiki.widgets / mw.widgets.CategoryMultiselectWidget.js
index c506379..54ddca7 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,
                NS_CATEGORY = mw.config.get( 'wgNamespaceIds' ).category;
 
                                } ).done( function ( res ) {
                                        var categories = [];
 
-                                       $.each( res.query.pages, function ( index, page ) {
+                                       res.query.pages.forEach( function ( page ) {
                                                if ( !page.missing ) {
                                                        categories.push( page.title );
                                                }
                                } ).done( function ( res ) {
                                        var categories = [];
 
-                                       $.each( res.query.pages, function ( index, page ) {
+                                       res.query.pages.forEach( function ( page ) {
                                                if ( !page.missing && Array.isArray( page.categories ) ) {
                                                        categories.push.apply( categories, page.categories.map( function ( category ) {
                                                                return category.title;
                /** Search only parent categories */
                ParentCategories: 4
        };
-}( jQuery, mediaWiki ) );
+}() );