X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fmediawiki.special.apisandbox%2Fapisandbox.js;h=48b3269bfaeb4a42c0a93cef667d88eb54ce894b;hb=fe94275c8fcfc248a5eae857dde7c5772d993ab5;hp=7c0d2324ab1428b5495d45acd673e2a4315bcc85;hpb=695d7c28fe7036e9988ce92908185ebc41238296;p=lhc%2Fweb%2Fwiklou.git 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 ) ); +}() );