Use native ES5 Array prototype methods instead of jQuery
authorFomafix <fomafix@googlemail.com>
Fri, 12 Jan 2018 15:47:40 +0000 (16:47 +0100)
committerFomafix <fomafix@googlemail.com>
Fri, 12 Jan 2018 18:02:38 +0000 (19:02 +0100)
commit8fb63bad5c22f853050806ccd93b3042bf3a2ae3
tree2e6f6900974e76fb5ccaab2b8df1cdfa69afccff
parentbd83a8ca88447ab9dcb2e2a1c8be2cf2ec64157f
Use native ES5 Array prototype methods instead of jQuery

Replace
* $.each( array, function ( index, value ) { ... } ) by
  array.forEach( function ( value, index ) { ... } )

* $.grep( array, function ( value ) { ... } ) by
  array.filter( function ( value ) { ... } )

* $.map( array, function ( value ) { ... } ) by
  array.map( function ( value ) { ... } )

* $.inArray( value, array ) by
  array.indexOf( value )

This change is a follow-up to 1edba8029a561919febf8b90f5df689d090665dd.

Change-Id: I16134642c52002de0eacb987bed5143f528bf627
13 files changed:
resources/src/jquery/jquery.suggestions.js
resources/src/jquery/jquery.tablesorter.js
resources/src/mediawiki.action/mediawiki.action.edit.stash.js
resources/src/mediawiki.special/mediawiki.special.apisandbox.js
resources/src/mediawiki.special/mediawiki.special.block.js
resources/src/mediawiki.special/mediawiki.special.upload.js
resources/src/mediawiki/api.js
resources/src/mediawiki/mediawiki.jqueryMsg.js
resources/src/mediawiki/page/image-pagination.js
tests/qunit/suites/resources/jquery/jquery.textSelection.test.js
tests/qunit/suites/resources/mediawiki.api/mediawiki.api.options.test.js
tests/qunit/suites/resources/mediawiki.api/mediawiki.api.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js