X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.widgets%2Fmw.widgets.CategoryCapsuleItemWidget.js;h=42ef1ac620d20273d772da6ef59af0f7f55fbd03;hb=d2b5c86eac27b0ce60076502f195b1b37d762c60;hp=4d86cfd5965bfeb216403cec162bbc6f08c747e9;hpb=b9f443d6174d6ff8a9f1bdf93b4c9b886ef2b91c;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/mediawiki.widgets/mw.widgets.CategoryCapsuleItemWidget.js b/resources/src/mediawiki.widgets/mw.widgets.CategoryCapsuleItemWidget.js index 4d86cfd596..42ef1ac620 100644 --- a/resources/src/mediawiki.widgets/mw.widgets.CategoryCapsuleItemWidget.js +++ b/resources/src/mediawiki.widgets/mw.widgets.CategoryCapsuleItemWidget.js @@ -61,7 +61,7 @@ $.each( response.query.pages, function ( index, page ) { pages[ page.title ] = !page.missing; } ); - $.each( titles, function ( index, title ) { + titles.forEach( function ( title ) { var normalizedTitle = title; while ( normalized[ normalizedTitle ] ) { normalizedTitle = normalized[ normalizedTitle ]; @@ -94,7 +94,8 @@ * @extends mw.Title * * @constructor - * @inheritdoc + * @param {string} title + * @param {number} [namespace] */ function ForeignTitle( title, namespace ) { // We only need to handle categories here... but we don't know the target language. @@ -109,11 +110,10 @@ }; /** - * @class mw.widgets.CategoryCapsuleItemWidget - * * Category selector capsule item widget. Extends OO.ui.CapsuleItemWidget 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.CategoryCapsuleItemWidget * @uses mw.Api * @extends OO.ui.CapsuleItemWidget * @@ -146,7 +146,6 @@ this.$label.replaceWith( this.$link ); this.setLabelElement( this.$link ); - /*jshint -W024*/ if ( !this.constructor.static.pageExistenceCaches[ this.apiUrl ] ) { this.constructor.static.pageExistenceCaches[ this.apiUrl ] = new PageExistenceCache( new mw.ForeignApi( this.apiUrl ) ); @@ -156,7 +155,6 @@ .done( function ( exists ) { widget.setMissing( !exists ); } ); - /*jshint +W024*/ }; /* Setup */ @@ -165,7 +163,6 @@ /* Static Properties */ - /*jshint -W024*/ /** * Map of API URLs to PageExistenceCache objects. * @@ -176,7 +173,6 @@ mw.widgets.CategoryCapsuleItemWidget.static.pageExistenceCaches = { '': new PageExistenceCache() }; - /*jshint +W024*/ /* Methods */