diff options
author | Timo Tijhof <krinklemail@gmail.com> | 2018-08-29 05:46:30 +0100 |
---|---|---|
committer | Timo Tijhof <krinklemail@gmail.com> | 2018-09-14 00:59:27 +0100 |
commit | add9bd191fd4d16250b301208600854cb52f6b33 (patch) | |
tree | 092b34b8deb1201cee71c586cfa4b6f9599b2e61 /resources/src/mediawiki.api/parse.js | |
parent | 8889c6a80c22db0687f7ed8f9cc7f9f5f985b584 (diff) | |
download | mediawikicore-add9bd191fd4d16250b301208600854cb52f6b33.tar.gz mediawikicore-add9bd191fd4d16250b301208600854cb52f6b33.zip |
resources: Strip '$' and 'mw' from file closures
Follows-up Id6d13bbea6:
- '$': mw.loader.implement does this already.
- 'mw': Use the canonical name directly.
This replaces the following patterns:
File closures (common):
- `( function ( $, mw ) {` => `( function () {`
- `( function ( $ ) {` => `( function () {`
- `( function ( mw ) {` => `( function () {`
- `( function ( mw, $ ) {` => `( function () {`
File closures (rare):
- `( function ( mw, $, OO ) {` => `( function () {`
- `( function ( mw, OO, $ ) {` => `( function () {`
- `( function ( mw, document ) {` => `( function () {`
Combined dom-ready and file closure (rare):
- `jQuery( function ( $ ) {` => `$( function () {
- `jQuery( function () {` => `$( function () {
Remaining references in files without a closure, as found by
the new ESLint setting (rare):
- `jQuery` => `$`
- `mediaWiki` => `mw`
Change-Id: I7cf2426cde597259e8c6f3f6f615a1a81a0ca82b
Diffstat (limited to 'resources/src/mediawiki.api/parse.js')
-rw-r--r-- | resources/src/mediawiki.api/parse.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/resources/src/mediawiki.api/parse.js b/resources/src/mediawiki.api/parse.js index f38e88b5c38c..42b0771dbf06 100644 --- a/resources/src/mediawiki.api/parse.js +++ b/resources/src/mediawiki.api/parse.js @@ -1,7 +1,7 @@ /** * @class mw.Api.plugin.parse */ -( function ( mw, $ ) { +( function () { $.extend( mw.Api.prototype, { /** @@ -46,4 +46,4 @@ * @mixins mw.Api.plugin.parse */ -}( mediaWiki, jQuery ) ); +}() ); |