* @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 ) );
+}() );