X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.special.apisandbox%2Fapisandbox.js;h=48b3269bfaeb4a42c0a93cef667d88eb54ce894b;hp=7c0d2324ab1428b5495d45acd673e2a4315bcc85;hb=2f5d88819799f077f4d3a3288dad104141692f20;hpb=a075f50a86be14347100f662ccd683af4f437090 diff --git a/resources/src/mediawiki.special.apisandbox/apisandbox.js b/resources/src/mediawiki.special.apisandbox/apisandbox.js index 7c0d2324ab..48b3269bfa 100644 --- a/resources/src/mediawiki.special.apisandbox/apisandbox.js +++ b/resources/src/mediawiki.special.apisandbox/apisandbox.js @@ -1,4 +1,5 @@ -( function ( $, mw, OO ) { +/* eslint-disable no-restricted-properties */ +( function () { 'use strict'; var ApiSandbox, Util, WidgetMethods, Validators, $content, panel, booklet, oldhash, windowManager, @@ -1596,6 +1597,7 @@ } toRemove = {}; + // eslint-disable-next-line no-restricted-properties $.each( this.templatedItemsCache, function ( k, el ) { if ( el.widget.isElementAttached() ) { toRemove[ k ] = el; @@ -1995,7 +1997,7 @@ return widget.apiCheckValid(); } ); $.when.apply( $, promises ).then( function () { - that.apiIsValid = $.inArray( false, arguments ) === -1; + that.apiIsValid = Array.prototype.indexOf.call( arguments, false ) === -1; if ( that.getOutlineItem() ) { that.getOutlineItem().setIcon( that.apiIsValid || suppressErrors ? null : 'alert' ); that.getOutlineItem().setIconTitle( @@ -2070,4 +2072,4 @@ module.exports = ApiSandbox; -}( jQuery, mediaWiki, OO ) ); +}() );