Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/373139 )

Change subject: WIP: Limit usage of global jQuery in preference of ES6
......................................................................

WIP: Limit usage of global jQuery in preference of ES6

* ESLint will now complain if you use global jQuery
* Object.assign used instead of $.extend
* global $ is now allowed inside initialisation scripts, tests
* it is also allowed View/OverlayManager which are in control of
rendering and state

TODO:
* Add polyfills for Object.assign
* Fix BackToTopOverlay FIXME in a patch before this
* Replace $.Deferred calls where possible
* Review/Reconsider usages of $.inArray and $.proxy and $.noop

Change-Id: Ia3a6a5d13df1a3f96121c6a755ac7822d77afcf6
---
M .eslintrc.json
M resources/mobile.abusefilter/AbuseFilterOverlay.js
M resources/mobile.backtotop/BackToTopOverlay.js
M resources/mobile.betaoptin/BetaOptinPanel.js
M resources/mobile.categories.overlays/CategoryAddOverlay.js
M resources/mobile.categories.overlays/CategoryGateway.js
M resources/mobile.categories.overlays/CategoryLookupInputWidget.js
M resources/mobile.categories.overlays/CategoryOverlay.js
M resources/mobile.editor.api/EditorGateway.js
M resources/mobile.editor.common/EditorOverlayBase.js
M resources/mobile.editor.overlay/EditorOverlay.js
M resources/mobile.editor.ve/VisualEditorOverlay.js
M resources/mobile.fontchanger/FontChanger.js
M resources/mobile.foreignApi/JSONPForeignApi.js
M resources/mobile.gallery/PhotoList.js
M resources/mobile.gallery/PhotoListGateway.js
M resources/mobile.gallery/test_PhotoListApiGateway.js
M resources/mobile.infiniteScroll/InfiniteScroll.js
M resources/mobile.issues/CleanupOverlay.js
M resources/mobile.languages.structured/LanguageOverlay.js
M resources/mobile.mediaViewer/ImageGateway.js
M resources/mobile.mediaViewer/ImageOverlay.js
M resources/mobile.nearby/Nearby.js
M resources/mobile.nearby/NearbyGateway.js
M resources/mobile.notifications.filter.overlay/NotificationsFilterOverlay.js
M resources/mobile.notifications.overlay/NotificationsOverlay.js
M resources/mobile.pagelist.scripts/WatchstarPageList.js
M resources/mobile.patrol.ajax/init.js
M resources/mobile.pointerOverlay/PointerOverlay.js
M resources/mobile.references.gateway/ReferencesHtmlScraperGateway.js
M resources/mobile.references.gateway/ReferencesMobileViewGateway.js
M resources/mobile.references/ReferencesDrawer.js
M resources/mobile.search.api/SearchGateway.js
M resources/mobile.search.util/extendSearchParams.js
M resources/mobile.search/SearchOverlay.js
M resources/mobile.special.mobileeditor.scripts/redirectmobileeditor.js
M resources/mobile.special.mobileoptions.scripts.fontchanger/init.js
M resources/mobile.special.mobileoptions.scripts/mobileoptions.js
M resources/mobile.special.nearby.scripts/nearby.js
M resources/mobile.special.uploads.scripts/uploads.js
M resources/mobile.special.userlogin.scripts/userlogin.js
M resources/mobile.startup/CtaDrawer.js
M resources/mobile.startup/Drawer.js
M resources/mobile.startup/Icon.js
M resources/mobile.startup/Overlay.js
M resources/mobile.startup/OverlayManager.js
M resources/mobile.startup/Page.js
M resources/mobile.startup/PageGateway.js
M resources/mobile.startup/PageList.js
M resources/mobile.startup/Skin.js
M resources/mobile.startup/View.js
M resources/mobile.startup/browser.js
M resources/mobile.startup/icons.js
M resources/mobile.startup/oo-extend.js
M resources/mobile.startup/time.js
M resources/mobile.startup/toast.js
M resources/mobile.startup/user.js
M resources/mobile.startup/util.js
M resources/mobile.talk.overlays/TalkOverlay.js
M resources/mobile.talk.overlays/TalkSectionAddOverlay.js
M resources/mobile.talk.overlays/TalkSectionOverlay.js
M resources/mobile.toggle/toggle.js
M resources/mobile.watchlist/WatchList.js
M resources/mobile.watchlist/WatchListGateway.js
M resources/mobile.watchstar/WatchstarGateway.js
M tests/qunit/mobile.editor.api/test_EditorGateway.js
M tests/qunit/mobile.editor.overlay/test_EditorOverlay.js
M tests/qunit/mobile.infiniteScroll/test_InfiniteScroll.js
M tests/qunit/mobile.languages.structured/test_util.js
M tests/qunit/mobile.mediaViewer/test_ImageOverlay.js
M tests/qunit/mobile.nearby/test_Nearby.js
M tests/qunit/mobile.nearby/test_NearbyGateway.js
M tests/qunit/mobile.pagelist.scripts/test_WatchstarPageList.js
M tests/qunit/mobile.references.gateway/test_ReferencesHtmlScraperGateway.js
M tests/qunit/mobile.references.gateway/test_ReferencesMobileViewGateway.js
M tests/qunit/mobile.references/test_ReferencesDrawer.js
M tests/qunit/mobile.search.api/test_SearchGateway.js
M tests/qunit/mobile.search.util/test_extendSearchParams.js
M tests/qunit/mobile.startup/test_Overlay.js
M tests/qunit/mobile.startup/test_OverlayManager.js
M tests/qunit/mobile.startup/test_Page.js
M tests/qunit/mobile.startup/test_PageGateway.js
M tests/qunit/mobile.startup/test_Skin.js
M tests/qunit/mobile.startup/test_View.js
M tests/qunit/mobile.startup/test_browser.js
M tests/qunit/mobile.talk.overlays/test_TalkOverlay.js
M tests/qunit/mobile.talk.overlays/test_TalkSectionAddOverlay.js
M tests/qunit/mobile.talk.overlays/test_TalkSectionOverlay.js
M tests/qunit/mobile.toggle/test_toggle.js
M tests/qunit/mobile.watchlist/test_WatchList.js
M tests/qunit/mobile.watchlist/test_WatchListGateway.js
M tests/qunit/mobile.watchstar/test_Watchstar.js
M tests/qunit/mobile.watchstar/test_WatchstarGateway.js
93 files changed, 297 insertions(+), 271 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/39/373139/1

diff --git a/.eslintrc.json b/.eslintrc.json
index 2a845ca..e2f252e 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -2,7 +2,7 @@
        "extends": "wikimedia",
        "env": {
                "browser": true,
-               "jquery": true,
+               "jquery": false,
                "qunit": true
        },
        "globals": {
diff --git a/resources/mobile.abusefilter/AbuseFilterOverlay.js 
b/resources/mobile.abusefilter/AbuseFilterOverlay.js
index 5a97e88..5c5f854 100644
--- a/resources/mobile.abusefilter/AbuseFilterOverlay.js
+++ b/resources/mobile.abusefilter/AbuseFilterOverlay.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var Button = M.require( 'mobile.startup/Button' ),
                Overlay = M.require( 'mobile.startup/Overlay' );
 
@@ -18,13 +18,13 @@
                 * @cfg {Object} defaults Default options hash.
                 * @cfg {Object} defaults.confirmButton options for a confirm 
Button
                 */
-               defaults: $.extend( {}, Overlay.prototype.defaults, {
+               defaults: Object.assign( {}, Overlay.prototype.defaults, {
                        confirmButton: new Button( {
                                additionalClassNames: 'cancel',
                                progressive: true
                        } ).options
                } ),
-               templatePartials: $.extend( {}, 
Overlay.prototype.templatePartials, {
+               templatePartials: Object.assign( {}, 
Overlay.prototype.templatePartials, {
                        button: Button.prototype.template,
                        content: mw.template.get( 'mobile.abusefilter', 
'Overlay.hogan' )
                } ),
@@ -39,4 +39,4 @@
        } );
 
        M.define( 'mobile.abusefilter/AbuseFilterOverlay', AbuseFilterOverlay );
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.backtotop/BackToTopOverlay.js 
b/resources/mobile.backtotop/BackToTopOverlay.js
index 452aed1..49b5803 100644
--- a/resources/mobile.backtotop/BackToTopOverlay.js
+++ b/resources/mobile.backtotop/BackToTopOverlay.js
@@ -1,4 +1,5 @@
-( function ( M, $ ) {
+/* global $ */
+( function ( M ) {
 
        var View = M.require( 'mobile.startup/View' );
 
@@ -23,7 +24,7 @@
                /**
                 * @inheritdoc
                 */
-               events: $.extend( {}, View.prototype.events, {
+               events: Object.assign( {}, View.prototype.events, {
                        click: 'onBackToTopClick'
                } ),
 
@@ -46,10 +47,11 @@
                 * to the top smoothly.
                 */
                onBackToTopClick: function () {
+                       // FIXME: This should be bound by the caller.
                        $( 'html, body' ).animate( { scrollTop: 0 }, 400 );
                }
        } );
 
        M.define( 'mobile.backtotop/BackToTopOverlay', BackToTopOverlay ); // 
resource-modules-disable-line
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.betaoptin/BetaOptinPanel.js 
b/resources/mobile.betaoptin/BetaOptinPanel.js
index 991c5c6..268cfa2 100644
--- a/resources/mobile.betaoptin/BetaOptinPanel.js
+++ b/resources/mobile.betaoptin/BetaOptinPanel.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
 
        var Button = M.require( 'mobile.startup/Button' ),
                Panel = M.require( 'mobile.startup/Panel' );
@@ -13,11 +13,11 @@
 
        OO.mfExtend( BetaOptinPanel, Panel, {
                className: 'panel panel-inline visible',
-               templatePartials: $.extend( {}, 
Panel.prototype.templatePartials, {
+               templatePartials: Object.assign( {}, 
Panel.prototype.templatePartials, {
                        button: Button.prototype.template
                } ),
                template: mw.template.get( 'mobile.betaoptin', 'Panel.hogan' ),
-               defaults: $.extend( {}, Panel.prototype.defaults, {
+               defaults: Object.assign( {}, Panel.prototype.defaults, {
                        postUrl: undefined,
                        editToken: mw.user.tokens.get( 'editToken' ),
                        text: mw.msg( 'mobile-frontend-panel-betaoptin-msg' ),
@@ -33,7 +33,7 @@
                                } ).options
                        ]
                } ),
-               events: $.extend( {}, Panel.prototype.events, {
+               events: Object.assign( {}, Panel.prototype.events, {
                        'click .optin': 'onOptin'
                } ),
                /**
@@ -47,4 +47,4 @@
 
        M.define( 'mobile.betaoptin/BetaOptinPanel', BetaOptinPanel ); // 
resource-modules-disable-line
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.categories.overlays/CategoryAddOverlay.js 
b/resources/mobile.categories.overlays/CategoryAddOverlay.js
index 2bd936c..26b05b4 100644
--- a/resources/mobile.categories.overlays/CategoryAddOverlay.js
+++ b/resources/mobile.categories.overlays/CategoryAddOverlay.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
 
        var Overlay = M.require( 'mobile.startup/Overlay' ),
                CategoryGateway = M.require( 
'mobile.categories.overlays/CategoryGateway' ),
@@ -27,7 +27,7 @@
                 * @cfg {string} defaults.waitIcon HTML of the icon that 
displays while a page edit
                 * is being saved.
                 */
-               defaults: $.extend( {}, Overlay.prototype.defaults, {
+               defaults: Object.assign( {}, Overlay.prototype.defaults, {
                        headerButtonsListClassName: 'header-action',
                        waitMsg: mw.msg( 'mobile-frontend-categories-add-wait' 
),
                        waitIcon: icons.spinner().toHtmlString()
@@ -35,7 +35,7 @@
                /**
                 * @inheritdoc
                 */
-               events: $.extend( {}, Overlay.prototype.events, {
+               events: Object.assign( {}, Overlay.prototype.events, {
                        'click .save': 'onSaveClick',
                        'click .suggestion': 'onCategoryClick'
                } ),
@@ -50,7 +50,7 @@
                /**
                 * @inheritdoc
                 */
-               templatePartials: $.extend( {}, 
Overlay.prototype.templatePartials, {
+               templatePartials: Object.assign( {}, 
Overlay.prototype.templatePartials, {
                        header: mw.template.get( 'mobile.categories.overlays', 
'CategoryAddOverlayHeader.hogan' ),
                        saveHeader: mw.template.get( 'mobile.editor.common', 
'saveHeader.hogan' )
                } ),
@@ -135,4 +135,4 @@
 
        M.define( 'mobile.categories.overlays/CategoryAddOverlay', 
CategoryAddOverlay ); // resource-modules-disable-line
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.categories.overlays/CategoryGateway.js 
b/resources/mobile.categories.overlays/CategoryGateway.js
index 61f640f..61a4733 100644
--- a/resources/mobile.categories.overlays/CategoryGateway.js
+++ b/resources/mobile.categories.overlays/CategoryGateway.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var prototype,
                SearchGateway = M.require( 'mobile.search.api/SearchGateway' );
 
@@ -36,7 +36,7 @@
                /**
                 * Returns the categories the title belongs to.
                 * @param {string} title Title of the current page (to add the 
categories to)
-                * @return {jQuery.Deferred|boolean} False, if no further 
continuation is possible, jQuery.Deferred otherwise.
+                * @return {jQuery.Deferred|boolean} False, if no further 
continuation is possible.Deferred otherwise.
                 */
                getCategories: function ( title ) {
                        var self = this;
@@ -45,7 +45,7 @@
                                return false;
                        }
 
-                       return this.api.get( $.extend( {}, {
+                       return this.api.get( Object.assign( {}, {
                                action: 'query',
                                prop: 'categories',
                                titles: title,
@@ -64,8 +64,8 @@
                }
        };
        OO.inheritClass( CategoryGateway, SearchGateway );
-       $.extend( CategoryGateway.prototype, prototype );
+       Object.assign( CategoryGateway.prototype, prototype );
 
        M.define( 'mobile.categories.overlays/CategoryGateway', CategoryGateway 
);
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.categories.overlays/CategoryLookupInputWidget.js 
b/resources/mobile.categories.overlays/CategoryLookupInputWidget.js
index 97c3d18..b029df4 100644
--- a/resources/mobile.categories.overlays/CategoryLookupInputWidget.js
+++ b/resources/mobile.categories.overlays/CategoryLookupInputWidget.js
@@ -92,4 +92,4 @@
 
        M.define( 'mobile.categories.overlays/CategoryLookupInputWidget', 
CategoryLookupInputWidget );
 
-}( mw.mobileFrontend, jQuery, OO ) );
+}( mw.mobileFrontend, OO ) );
diff --git a/resources/mobile.categories.overlays/CategoryOverlay.js 
b/resources/mobile.categories.overlays/CategoryOverlay.js
index 85a0325..20a793f 100644
--- a/resources/mobile.categories.overlays/CategoryOverlay.js
+++ b/resources/mobile.categories.overlays/CategoryOverlay.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
 
        var Overlay = M.require( 'mobile.startup/Overlay' ),
                InfiniteScroll = M.require( 
'mobile.infiniteScroll/InfiniteScroll' ),
@@ -32,7 +32,7 @@
                 * @cfg {Array} defaults.headerButtons Objects that will be 
used as defaults for
                 * generating header buttons.
                 */
-               defaults: $.extend( {}, Overlay.prototype.defaults, {
+               defaults: Object.assign( {}, Overlay.prototype.defaults, {
                        heading: mw.msg( 'mobile-frontend-categories-heading' ),
                        subheading: mw.msg( 
'mobile-frontend-categories-subheading' ),
                        headerButtonsListClassName: 'header-action',
@@ -51,11 +51,11 @@
                /**
                 * @inheritdoc
                 */
-               templatePartials: $.extend( {}, 
Overlay.prototype.templatePartials, {
+               templatePartials: Object.assign( {}, 
Overlay.prototype.templatePartials, {
                        content: mw.template.get( 'mobile.categories.overlays', 
'CategoryOverlay.hogan' ),
                        item: mw.template.get( 'mobile.categories.overlays', 
'CategoryOverlayItem.hogan' )
                } ),
-               events: $.extend( {}, Overlay.prototype.events, {
+               events: Object.assign( {}, Overlay.prototype.events, {
                        'click .catlink': 'onCatlinkClick'
                } ),
                /**
@@ -151,4 +151,4 @@
 
        M.define( 'mobile.categories.overlays/CategoryOverlay', CategoryOverlay 
); // resource-modules-disable-line
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.editor.api/EditorGateway.js 
b/resources/mobile.editor.api/EditorGateway.js
index 40f73fe..5923e88 100644
--- a/resources/mobile.editor.api/EditorGateway.js
+++ b/resources/mobile.editor.api/EditorGateway.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        /**
         * API that helps save and retrieve page content
         * @class EditorGateway
@@ -244,7 +244,7 @@
                                sectionLine = '',
                                self = this;
 
-                       $.extend( options, {
+                       Object.assign( options, {
                                action: 'parse',
                                // Enable section preview mode to avoid errors 
(bug 49218)
                                sectionpreview: true,
@@ -279,4 +279,4 @@
 
        M.define( 'mobile.editor.api/EditorGateway', EditorGateway );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.editor.common/EditorOverlayBase.js 
b/resources/mobile.editor.common/EditorOverlayBase.js
index ebb2f9f..6771171 100644
--- a/resources/mobile.editor.common/EditorOverlayBase.js
+++ b/resources/mobile.editor.common/EditorOverlayBase.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var Overlay = M.require( 'mobile.startup/Overlay' ),
                PageGateway = M.require( 'mobile.startup/PageGateway' ),
                browser = M.require( 'mobile.startup/Browser' ).getSingleton(),
@@ -107,7 +107,7 @@
                 * @cfg {string} defaults.licenseMsg Text and link of the 
license, under which this contribution will be
                 * released to inform the user.
                 */
-               defaults: $.extend( {}, Overlay.prototype.defaults, {
+               defaults: Object.assign( {}, Overlay.prototype.defaults, {
                        hasToolbar: false,
                        continueMsg: mw.msg( 'mobile-frontend-editor-continue' 
),
                        cancelMsg: mw.msg( 'mobile-frontend-editor-cancel' ),
@@ -128,7 +128,7 @@
                        licenseMsg: undefined
                } ),
                /** @inheritdoc **/
-               templatePartials: $.extend( {}, 
Overlay.prototype.templatePartials, {
+               templatePartials: Object.assign( {}, 
Overlay.prototype.templatePartials, {
                        editHeader: mw.template.get( 'mobile.editor.common', 
'editHeader.hogan' ),
                        previewHeader: mw.template.get( 'mobile.editor.common', 
'previewHeader.hogan' ),
                        saveHeader: mw.template.get( 'mobile.editor.common', 
'saveHeader.hogan' )
@@ -137,7 +137,7 @@
                template: mw.template.get( 'mobile.editor.common', 
'EditorOverlayBase.hogan' ),
                /** @inheritdoc **/
                className: 'overlay editor-overlay',
-               events: $.extend( {}, Overlay.prototype.events, {
+               events: Object.assign( {}, Overlay.prototype.events, {
                        'click .back': 'onClickBack',
                        'click .continue': 'onClickContinue',
                        'click .submit': 'onClickSubmit'
@@ -147,7 +147,7 @@
                 * @param {Object} data
                 */
                log: function ( data ) {
-                       mw.track( 'mf.schemaEdit', $.extend( data, {
+                       mw.track( 'mf.schemaEdit', Object.assign( data, {
                                editor: this.editor,
                                editingSessionId: this.sessionId
                        } ) );
@@ -388,4 +388,4 @@
 
        M.define( 'mobile.editor.common/EditorOverlayBase', EditorOverlayBase )
                .deprecate( 'modules/editor/EditorOverlayBase' );
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.editor.overlay/EditorOverlay.js 
b/resources/mobile.editor.overlay/EditorOverlay.js
index ce68ce5..dcea6f5 100644
--- a/resources/mobile.editor.overlay/EditorOverlay.js
+++ b/resources/mobile.editor.overlay/EditorOverlay.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var EditorOverlayBase = M.require( 
'mobile.editor.common/EditorOverlayBase' ),
                Section = M.require( 'mobile.startup/Section' ),
                EditorGateway = M.require( 'mobile.editor.api/EditorGateway' ),
@@ -51,7 +51,7 @@
                /** @inheritdoc **/
                isBorderBox: false,
                /** @inheritdoc **/
-               templatePartials: $.extend( {}, 
EditorOverlayBase.prototype.templatePartials, {
+               templatePartials: Object.assign( {}, 
EditorOverlayBase.prototype.templatePartials, {
                        content: mw.template.get( 'mobile.editor.overlay', 
'content.hogan' ),
                        messageBox: MessageBox.prototype.template,
                        anonWarning: mw.template.get( 'mobile.editor.common', 
'EditorOverlayAnonWarning.hogan' )
@@ -65,7 +65,7 @@
                 * @cfg {Object} defaults.warningOptions options for a 
MessageBox to display anonymous message warning
                 * @cfg {mw.Api} defaults.api an api module to retrieve pages
                 */
-               defaults: $.extend( {}, EditorOverlayBase.prototype.defaults, {
+               defaults: Object.assign( {}, 
EditorOverlayBase.prototype.defaults, {
                        loginButton: new Button( {
                                block: true,
                                label: mw.msg( 
'mobile-frontend-watchlist-cta-button-login' )
@@ -99,7 +99,7 @@
                                mw.config.get( 'wgTranslatePageTranslation' ) 
!== 'translation' &&
                                mw.config.get( 'wgPageContentModel' ) === 
'wikitext';
                },
-               events: $.extend( {}, EditorOverlayBase.prototype.events, {
+               events: Object.assign( {}, EditorOverlayBase.prototype.events, {
                        'input .wikitext-editor': 'onInputWikitextEditor'
                } ),
                /**
@@ -211,22 +211,22 @@
                 * @return {Object} Object with all options
                 */
                _prepareAnonWarning: function ( options ) {
-                       var params = $.extend( {
+                       var params = Object.assign( {
                                // use wgPageName as this includes the 
namespace if outside Main
                                        returnto: options.returnTo || 
mw.config.get( 'wgPageName' ),
                                        returntoquery: 'action=edit&section=' + 
options.sectionId,
                                        warning: 
'mobile-frontend-edit-login-action'
                                }, options.queryParams ),
-                               signupParams = $.extend( {
+                               signupParams = Object.assign( {
                                        type: 'signup',
                                        warning: 
'mobile-frontend-edit-signup-action'
                                }, options.signupQueryParams );
 
-                       options.loginButton = $.extend( {
+                       options.loginButton = Object.assign( {
                                href: mw.util.getUrl( 'Special:UserLogin', 
params )
                        }, this.defaults.loginButton );
-                       options.signupButton = $.extend( {
-                               href: mw.util.getUrl( 'Special:UserLogin', 
$.extend( params, signupParams ) )
+                       options.signupButton = Object.assign( {
+                               href: mw.util.getUrl( 'Special:UserLogin', 
Object.assign( params, signupParams ) )
                        }, this.defaults.signupButton );
 
                        return options;
@@ -518,4 +518,4 @@
        } );
 
        M.define( 'mobile.editor.overlay/EditorOverlay', EditorOverlay );
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.editor.ve/VisualEditorOverlay.js 
b/resources/mobile.editor.ve/VisualEditorOverlay.js
index c6dc58e..5ae726b 100644
--- a/resources/mobile.editor.ve/VisualEditorOverlay.js
+++ b/resources/mobile.editor.ve/VisualEditorOverlay.js
@@ -19,7 +19,7 @@
                /** @inheritdoc **/
                isBorderBox: false,
                /** @inheritdoc **/
-               templatePartials: $.extend( {}, 
EditorOverlayBase.prototype.templatePartials, {
+               templatePartials: Object.assign( {}, 
EditorOverlayBase.prototype.templatePartials, {
                        editHeader: mw.template.get( 'mobile.editor.ve', 
'toolbarVE.hogan' ),
                        content: mw.template.get( 'mobile.editor.ve', 
'contentVE.hogan' )
                } ),
@@ -146,4 +146,4 @@
 
        M.define( 'mobile.editor.ve/VisualEditorOverlay', VisualEditorOverlay );
 
-}( mw.mobileFrontend, jQuery, window.ve ) );
+}( mw.mobileFrontend, window.ve ) );
diff --git a/resources/mobile.fontchanger/FontChanger.js 
b/resources/mobile.fontchanger/FontChanger.js
index bb94378..4a6b992 100644
--- a/resources/mobile.fontchanger/FontChanger.js
+++ b/resources/mobile.fontchanger/FontChanger.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var View = M.require( 'mobile.startup/View' ),
                Button = M.require( 'mobile.startup/Button' );
 
@@ -92,4 +92,4 @@
 
        M.define( 'mobile.fontchanger/FontChanger', FontChanger );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.foreignApi/JSONPForeignApi.js 
b/resources/mobile.foreignApi/JSONPForeignApi.js
index 4a369cf..dd637e7 100644
--- a/resources/mobile.foreignApi/JSONPForeignApi.js
+++ b/resources/mobile.foreignApi/JSONPForeignApi.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var ForeignApi = mw.ForeignApi;
 
        /**
@@ -32,7 +32,7 @@
                        // Fire jsonp where it can be.
                        ajaxOptions.dataType = 'jsonp';
                        // explicitly avoid requesting central auth tokens
-                       parameters = $.extend( {}, parameters, {
+                       parameters = Object.assign( {}, parameters, {
                                centralauthtoken: false
                        } );
                }
@@ -41,4 +41,4 @@
 
        M.define( 'mobile.foreignApi/JSONPForeignApi', JSONPForeignApi );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.gallery/PhotoList.js 
b/resources/mobile.gallery/PhotoList.js
index 5e7cdcc..706e89f 100644
--- a/resources/mobile.gallery/PhotoList.js
+++ b/resources/mobile.gallery/PhotoList.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var icons = M.require( 'mobile.startup/icons' ),
                PhotoListGateway = M.require( 'mobile.gallery/PhotoListGateway' 
),
                PhotoItem = M.require( 'mobile.gallery/PhotoItem' ),
@@ -121,4 +121,4 @@
        } );
 
        M.define( 'mobile.gallery/PhotoList', PhotoList );
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.gallery/PhotoListGateway.js 
b/resources/mobile.gallery/PhotoListGateway.js
index 9b316ed..d773ec4 100644
--- a/resources/mobile.gallery/PhotoListGateway.js
+++ b/resources/mobile.gallery/PhotoListGateway.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var IMAGE_WIDTH = mw.config.get( 'wgMFThumbnailSizes' ).small;
 
        /**
@@ -68,7 +68,7 @@
                 * @return {Object}
                 */
                getQuery: function () {
-                       var query = $.extend( {
+                       var query = Object.assign( {
                                action: 'query',
                                prop: 'imageinfo',
                                // FIXME: [API] have to request timestamp since 
api returns an object
@@ -78,7 +78,7 @@
                        }, this.continueParams );
 
                        if ( this.username ) {
-                               $.extend( query, {
+                               Object.assign( query, {
                                        generator: 'allimages',
                                        gaiuser: this.username,
                                        gaisort: 'timestamp',
@@ -86,7 +86,7 @@
                                        gailimit: this.limit
                                } );
                        } else if ( this.category ) {
-                               $.extend( query, {
+                               Object.assign( query, {
                                        generator: 'categorymembers',
                                        gcmtitle: 'Category:' + this.category,
                                        gcmtype: 'file',
@@ -139,4 +139,4 @@
        };
 
        M.define( 'mobile.gallery/PhotoListGateway', PhotoListGateway );
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.gallery/test_PhotoListApiGateway.js 
b/resources/mobile.gallery/test_PhotoListApiGateway.js
index 09e7ec9..320b410 100644
--- a/resources/mobile.gallery/test_PhotoListApiGateway.js
+++ b/resources/mobile.gallery/test_PhotoListApiGateway.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
 
        var m = M.require( 'mobile.gallery/PhotoListApi' );
 
@@ -23,4 +23,4 @@
                } );
        } );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.infiniteScroll/InfiniteScroll.js 
b/resources/mobile.infiniteScroll/InfiniteScroll.js
index 954f63f..068bdea 100644
--- a/resources/mobile.infiniteScroll/InfiniteScroll.js
+++ b/resources/mobile.infiniteScroll/InfiniteScroll.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        /**
         * Class to assist a view in implementing infinite scrolling on some DOM
         * element.
@@ -140,4 +140,4 @@
        } );
 
        M.define( 'mobile.infiniteScroll/InfiniteScroll', InfiniteScroll );
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.issues/CleanupOverlay.js 
b/resources/mobile.issues/CleanupOverlay.js
index 6d29a69..0171999 100644
--- a/resources/mobile.issues/CleanupOverlay.js
+++ b/resources/mobile.issues/CleanupOverlay.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var Overlay = M.require( 'mobile.startup/Overlay' ),
                Icon = M.require( 'mobile.startup/Icon' ),
                icon = new Icon( {
@@ -22,7 +22,7 @@
        }
 
        OO.mfExtend( CleanupOverlay, Overlay, {
-               templatePartials: $.extend( {}, 
Overlay.prototype.templatePartials, {
+               templatePartials: Object.assign( {}, 
Overlay.prototype.templatePartials, {
                        content: mw.template.get( 'mobile.issues', 
'OverlayContent.hogan' )
                } ),
                /**
@@ -30,9 +30,9 @@
                 * @cfg {Object} defaults Default options hash.
                 * @cfg {string} defaults.className Class name of the 
'cleanup-gray' icon.
                 */
-               defaults: $.extend( {}, Overlay.prototype.defaults, {
+               defaults: Object.assign( {}, Overlay.prototype.defaults, {
                        className: icon.getClassName()
                } )
        } );
        M.define( 'mobile.issues/CleanupOverlay', CleanupOverlay ); // 
resource-modules-disable-line
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.languages.structured/LanguageOverlay.js 
b/resources/mobile.languages.structured/LanguageOverlay.js
index c345edc..40c35ef 100644
--- a/resources/mobile.languages.structured/LanguageOverlay.js
+++ b/resources/mobile.languages.structured/LanguageOverlay.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
 
        var Overlay = M.require( 'mobile.startup/Overlay' ),
                util = M.require( 'mobile.languages.structured/util' );
@@ -41,7 +41,7 @@
                 * @cfg {Object[]} defaults.languages each object has keys as
                 *  returned by the langlink API 
https://www.mediawiki.org/wiki/API:Langlinks
                 */
-               defaults: $.extend( {}, Overlay.prototype.defaults, {
+               defaults: Object.assign( {}, Overlay.prototype.defaults, {
                        heading: mw.msg( 'mobile-frontend-language-heading' ),
                        inputPlaceholder: mw.msg( 
'mobile-frontend-languages-structured-overlay-search-input-placeholder' ),
                        // we can't rely on CSS only to uppercase the headings. 
See 
https://stackoverflow.com/questions/3777443/css-text-transform-not-working-properly-for-turkish-characters
@@ -49,11 +49,11 @@
                        suggestedLanguagesHeader: mw.msg( 
'mobile-frontend-languages-structured-overlay-suggested-languages-header' 
).toLocaleUpperCase()
                } ),
                /** @inheritdoc */
-               templatePartials: $.extend( {}, 
Overlay.prototype.templatePartials, {
+               templatePartials: Object.assign( {}, 
Overlay.prototype.templatePartials, {
                        content: mw.template.get( 
'mobile.languages.structured', 'LanguageOverlay.hogan' )
                } ),
                /** @inheritdoc */
-               events: $.extend( {}, Overlay.prototype.events, {
+               events: Object.assign( {}, Overlay.prototype.events, {
                        'click a': 'onLinkClick',
                        'input .search': 'onSearchInput'
                } ),
@@ -141,4 +141,4 @@
 
        M.define( 'mobile.languages.structured/LanguageOverlay', 
LanguageOverlay ); // resource-modules-disable-line
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.mediaViewer/ImageGateway.js 
b/resources/mobile.mediaViewer/ImageGateway.js
index 9c606c3..1573da0 100644
--- a/resources/mobile.mediaViewer/ImageGateway.js
+++ b/resources/mobile.mediaViewer/ImageGateway.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var sizeBuckets = [ 320, 640, 800, 1024, 1280, 1920, 2560, 2880 ];
 
        /**
@@ -64,4 +64,4 @@
        ImageGateway._findSizeBucket = findSizeBucket;
        M.define( 'mobile.mediaViewer/ImageGateway', ImageGateway );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.mediaViewer/ImageOverlay.js 
b/resources/mobile.mediaViewer/ImageOverlay.js
index c4f90f8..9b87712 100644
--- a/resources/mobile.mediaViewer/ImageOverlay.js
+++ b/resources/mobile.mediaViewer/ImageOverlay.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var Overlay = M.require( 'mobile.startup/Overlay' ),
                Icon = M.require( 'mobile.startup/Icon' ),
                Button = M.require( 'mobile.startup/Button' ),
@@ -36,7 +36,7 @@
                 * @cfg {string} defaults.licenseLinkMsg Link to license 
information in media viewer.
                 * @cfg {Thumbnail[]} defaults.thumbnails a list of thumbnails 
to browse
                 */
-               defaults: $.extend( {}, Overlay.prototype.defaults, {
+               defaults: Object.assign( {}, Overlay.prototype.defaults, {
                        cancelButton: new Icon( {
                                tagName: 'button',
                                // Uses a dark theme so swap out the icon
@@ -64,7 +64,7 @@
                } ),
 
                /** @inheritdoc */
-               events: $.extend( {}, Overlay.prototype.events, {
+               events: Object.assign( {}, Overlay.prototype.events, {
                        'click .image-wrapper': 'onToggleDetails',
                        // Click tracking for table of contents so we can see 
if people interact with it
                        'click .slider-button': 'onSlide'
@@ -259,4 +259,4 @@
        } );
        M.define( 'mobile.mediaViewer/ImageOverlay', ImageOverlay ); // 
resource-modules-disable-line
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.nearby/Nearby.js 
b/resources/mobile.nearby/Nearby.js
index 70430b5..ad5ee0b 100644
--- a/resources/mobile.nearby/Nearby.js
+++ b/resources/mobile.nearby/Nearby.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var MessageBox = M.require( 'mobile.messageBox/MessageBox' ),
                NearbyGateway = M.require( 'mobile.nearby/NearbyGateway' ),
                WatchstarPageList = M.require( 
'mobile.pagelist.scripts/WatchstarPageList' ),
@@ -60,7 +60,7 @@
                                msg: mw.msg( 
'mobile-frontend-nearby-requirements-guidance' )
                        }
                },
-               templatePartials: $.extend( {}, 
WatchstarPageList.prototype.templatePartials, {
+               templatePartials: Object.assign( {}, 
WatchstarPageList.prototype.templatePartials, {
                        pageList: WatchstarPageList.prototype.template,
                        messageBox: MessageBox.prototype.template
                } ),
@@ -73,7 +73,7 @@
                 * @cfg {string} defaults.spinner HTML of the spinner icon with 
a tooltip that
                 * tells the user that their location is being looked up
                 */
-               defaults: $.extend( {}, WatchstarPageList.prototype.defaults, {
+               defaults: Object.assign( {}, 
WatchstarPageList.prototype.defaults, {
                        errorOptions: undefined,
                        spinner: icons.spinner( {
                                title: mw.msg( 'mobile-frontend-nearby-loading' 
)
@@ -193,7 +193,7 @@
                        } else {
                                message = this.errorMessages[ key ] || 
this.errorMessages.http;
                        }
-                       return $.extend( {
+                       return Object.assign( {
                                className: 'errorbox'
                        }, message );
                },
@@ -263,7 +263,7 @@
 
                                // Get some new pages
                                this.getCurrentPosition().done( function ( 
coordOptions ) {
-                                       $.extend( options, coordOptions );
+                                       Object.assign( options, coordOptions );
                                        self._find( options ).done( function ( 
options ) {
                                                _super.call( self, options );
                                        } );
@@ -293,4 +293,4 @@
 
        M.define( 'mobile.nearby/Nearby', Nearby );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.nearby/NearbyGateway.js 
b/resources/mobile.nearby/NearbyGateway.js
index b788db0..d0068b5 100644
--- a/resources/mobile.nearby/NearbyGateway.js
+++ b/resources/mobile.nearby/NearbyGateway.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var limit = 50,
                Page = M.require( 'mobile.startup/Page' ),
                ns = mw.config.get( 'wgContentNamespaces' ),
@@ -152,4 +152,4 @@
        };
 
        M.define( 'mobile.nearby/NearbyGateway', NearbyGateway );
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git 
a/resources/mobile.notifications.filter.overlay/NotificationsFilterOverlay.js 
b/resources/mobile.notifications.filter.overlay/NotificationsFilterOverlay.js
index bf7ef0a..b562bb5 100644
--- 
a/resources/mobile.notifications.filter.overlay/NotificationsFilterOverlay.js
+++ 
b/resources/mobile.notifications.filter.overlay/NotificationsFilterOverlay.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var Overlay = M.require( 'mobile.startup/Overlay' ),
                NotificationsFilterOverlay;
 
@@ -44,7 +44,7 @@
                 * @cfg {Object} defaults Default options hash.
                 * @cfg {String} defaults.heading Heading text.
                 */
-               defaults: $.extend( {}, Overlay.prototype.defaults, {
+               defaults: Object.assign( {}, Overlay.prototype.defaults, {
                        heading: mw.msg( 
'mobile-frontend-notifications-filter-title' )
                } ),
 
@@ -56,4 +56,4 @@
 
        M.define( 
'mobile.notifications.filter.overlay/NotificationsFilterOverlay', 
NotificationsFilterOverlay );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.notifications.overlay/NotificationsOverlay.js 
b/resources/mobile.notifications.overlay/NotificationsOverlay.js
index c21245f..f61e60b 100644
--- a/resources/mobile.notifications.overlay/NotificationsOverlay.js
+++ b/resources/mobile.notifications.overlay/NotificationsOverlay.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var Overlay = M.require( 'mobile.startup/Overlay' ),
                Anchor = M.require( 'mobile.startup/Anchor' ),
                NotificationsOverlay;
@@ -103,7 +103,7 @@
                 * @cfg {Object} defaults Default options hash.
                 * @cfg {string} defaults.heading Heading text.
                 */
-               defaults: $.extend( {}, Overlay.prototype.defaults, {
+               defaults: Object.assign( {}, Overlay.prototype.defaults, {
                        heading: mw.msg( 'notifications' ),
                        footerAnchor: new Anchor( {
                                href: mw.util.getUrl( 'Special:Notifications' ),
@@ -192,4 +192,4 @@
 
        M.define( 'mobile.notifications.overlay/NotificationsOverlay', 
NotificationsOverlay );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.pagelist.scripts/WatchstarPageList.js 
b/resources/mobile.pagelist.scripts/WatchstarPageList.js
index ab41157..b6b9dcb 100644
--- a/resources/mobile.pagelist.scripts/WatchstarPageList.js
+++ b/resources/mobile.pagelist.scripts/WatchstarPageList.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
 
        var PageList = M.require( 'mobile.startup/PageList' ),
                Watchstar = M.require( 'mobile.watchstar/Watchstar' ),
@@ -99,4 +99,4 @@
 
        M.define( 'mobile.pagelist.scripts/WatchstarPageList', 
WatchstarPageList );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.patrol.ajax/init.js 
b/resources/mobile.patrol.ajax/init.js
index d900f09..1027625 100644
--- a/resources/mobile.patrol.ajax/init.js
+++ b/resources/mobile.patrol.ajax/init.js
@@ -4,7 +4,7 @@
  *
  * @author Florian Schmidt <florian.schmidt.wel...@t-online.de>
  */
-( function ( M, $ ) {
+( function ( M ) {
        if ( !mw.user.tokens.exists( 'patrolToken' ) ) {
                // Current user has no patrol right, or an old cached version 
of user.tokens
                // that didn't have patrolToken yet.
@@ -65,4 +65,4 @@
                        e.preventDefault();
                } );
        } );
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.pointerOverlay/PointerOverlay.js 
b/resources/mobile.pointerOverlay/PointerOverlay.js
index 42a887a..e8ec627 100644
--- a/resources/mobile.pointerOverlay/PointerOverlay.js
+++ b/resources/mobile.pointerOverlay/PointerOverlay.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var Overlay = M.require( 'mobile.startup/Overlay' );
 
        /**
@@ -39,7 +39,7 @@
                 * @cfg {string} [defaults.alignment] Determines where the 
pointer should point to. Valid values 'left' or 'center'
                 * @cfg {string} [defaults.confirmMsg] Label for a confirm 
message.
                 */
-               defaults: $.extend( {}, Overlay.prototype.defaults, {
+               defaults: Object.assign( {}, Overlay.prototype.defaults, {
                        summary: undefined,
                        isCompact: false,
                        isTutorial: false,
@@ -145,4 +145,4 @@
 
        module.exports = PointerOverlay;
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git 
a/resources/mobile.references.gateway/ReferencesHtmlScraperGateway.js 
b/resources/mobile.references.gateway/ReferencesHtmlScraperGateway.js
index 4c093e5..d09abb1 100644
--- a/resources/mobile.references.gateway/ReferencesHtmlScraperGateway.js
+++ b/resources/mobile.references.gateway/ReferencesHtmlScraperGateway.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var ReferencesGateway = M.require( 
'mobile.references.gateway/ReferencesGateway' );
 
        /**
@@ -47,4 +47,4 @@
 
        M.define( 'mobile.references.gateway/ReferencesHtmlScraperGateway',
                ReferencesHtmlScraperGateway );
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.references.gateway/ReferencesMobileViewGateway.js 
b/resources/mobile.references.gateway/ReferencesMobileViewGateway.js
index c4200e8..e1317c0 100644
--- a/resources/mobile.references.gateway/ReferencesMobileViewGateway.js
+++ b/resources/mobile.references.gateway/ReferencesMobileViewGateway.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var moduleName = 
'mobile.references.gateway/ReferencesMobileViewGateway',
                ReferencesHtmlScraperGateway =
                M.require( 
'mobile.references.gateway/ReferencesHtmlScraperGateway' ),
@@ -123,4 +123,4 @@
 
        M.define( moduleName, ReferencesMobileViewGateway ); // 
resource-modules-disable-line
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.references/ReferencesDrawer.js 
b/resources/mobile.references/ReferencesDrawer.js
index afb182e..192466c 100644
--- a/resources/mobile.references/ReferencesDrawer.js
+++ b/resources/mobile.references/ReferencesDrawer.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var Drawer = M.require( 'mobile.startup/Drawer' ),
                icons = M.require( 'mobile.startup/icons' ),
                ReferencesGateway = M.require( 
'mobile.references.gateway/ReferencesGateway' ),
@@ -20,7 +20,7 @@
                 * @cfg {string} defaults.cancelButton HTML of the button that 
closes the drawer.
                 * @cfg {boolean} defaults.error whether an error message is 
being shown
                 */
-               defaults: $.extend( {}, Drawer.prototype.defaults, {
+               defaults: Object.assign( {}, Drawer.prototype.defaults, {
                        spinner: icons.spinner().toHtmlString(),
                        cancelButton: new Icon( {
                                name: 'overlay-close-gray',
@@ -127,4 +127,4 @@
        } );
 
        M.define( 'mobile.references/ReferencesDrawer', ReferencesDrawer ); // 
resource-modules-disable-line
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.search.api/SearchGateway.js 
b/resources/mobile.search.api/SearchGateway.js
index f0f6b85..b750bca 100644
--- a/resources/mobile.search.api/SearchGateway.js
+++ b/resources/mobile.search.api/SearchGateway.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var Page = M.require( 'mobile.startup/Page' ),
                extendSearchParams = M.require( 
'mobile.search.util/extendSearchParams' );
 
@@ -172,4 +172,4 @@
 
        M.define( 'mobile.search.api/SearchGateway', SearchGateway );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.search.util/extendSearchParams.js 
b/resources/mobile.search.util/extendSearchParams.js
index 2fede9f..c890ecc 100644
--- a/resources/mobile.search.util/extendSearchParams.js
+++ b/resources/mobile.search.util/extendSearchParams.js
@@ -1,11 +1,11 @@
-( function ( M, $ ) {
+( function ( M ) {
 
        /**
         * Extends the API query parameters to include those parameters 
required to also fetch Wikibase
         * descriptions and appropriately sized thumbnail images.
         *
-        * This function wraps `$.extend` with some Wikibase-specific 
configuration variable management
-        * but, like `$.extend`, is variadic and so can be used as a 
replacement for it in search
+        * This function wraps `Object.assign` with some Wikibase-specific 
configuration variable management
+        * but, like `Object.assign`, is variadic and so can be used as a 
replacement for it in search
         * gateways, e.g.
         *
         * ```
@@ -32,11 +32,11 @@
                        throw new Error( '"' + feature + '" isn\'t a feature 
that shows Wikibase descriptions.' );
                }
 
-               // Construct the arguments for a call to `$.extend` such that 
if it were hand-written, then it
+               // Construct the arguments for a call to `Object.assign` such 
that if it were hand-written, then it
                // would look like the following:
                //
                // ```
-               // var result = $.extend( {
+               // var result = Object.assign( {
                //   prop: []
                // }, params, /* ..., */ mw.config.get( 'wgMFSearchAPIParams' ) 
);
                // ```
@@ -46,7 +46,7 @@
                } );
                args.push( mw.config.get( 'wgMFSearchAPIParams' ) );
 
-               result = $.extend.apply( {}, args );
+               result = Object.assign.apply( {}, args );
                result.prop = result.prop.concat( mw.config.get( 
'wgMFQueryPropModules' ) );
 
                if ( displayWikibaseDescriptions[feature] ) {
@@ -69,4 +69,4 @@
 
        M.define( 'mobile.search.util/extendSearchParams', extendSearchParams );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.search/SearchOverlay.js 
b/resources/mobile.search/SearchOverlay.js
index c812340..aab6e54 100644
--- a/resources/mobile.search/SearchOverlay.js
+++ b/resources/mobile.search/SearchOverlay.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
 
        var
                Overlay = M.require( 'mobile.startup/Overlay' ),
@@ -37,7 +37,7 @@
 
        OO.mfExtend( SearchOverlay, Overlay, {
                isBorderBox: false,
-               templatePartials: $.extend( {}, 
Overlay.prototype.templatePartials, {
+               templatePartials: Object.assign( {}, 
Overlay.prototype.templatePartials, {
                        header: mw.template.get( 'mobile.search', 
'header.hogan' ),
                        content: mw.template.get( 'mobile.search', 
'content.hogan' ),
                        icon: Icon.prototype.template
@@ -64,7 +64,7 @@
                 * @cfg {string} defaults.action The value of wgScript
                 * @cfg {Object} defaults.feedback options for the feedback 
link below the search results
                 */
-               defaults: $.extend( {}, Overlay.prototype.defaults, {
+               defaults: Object.assign( {}, Overlay.prototype.defaults, {
                        headerChrome: true,
                        clearIcon: new Icon( {
                                tagName: 'button',
@@ -95,7 +95,7 @@
                /**
                 * @inheritdoc
                 */
-               events: $.extend( {}, Overlay.prototype.events, {
+               events: Object.assign( {}, Overlay.prototype.events, {
                        'input input': 'onInputInput',
                        'click .clear': 'onClickClear',
                        'click .search-content': 'onClickSearchContent',
@@ -402,4 +402,4 @@
 
        M.define( 'mobile.search/SearchOverlay', SearchOverlay ); // 
resource-modules-disable-line
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git 
a/resources/mobile.special.mobileeditor.scripts/redirectmobileeditor.js 
b/resources/mobile.special.mobileeditor.scripts/redirectmobileeditor.js
index 3998c9c..2d7cfe9 100644
--- a/resources/mobile.special.mobileeditor.scripts/redirectmobileeditor.js
+++ b/resources/mobile.special.mobileeditor.scripts/redirectmobileeditor.js
@@ -1,4 +1,5 @@
-( function ( $ ) {
+ /* global $ */
+( function () {
        // Redirect users with javascript to the proper editor
        var redirectTarget = $( '#mw-mf-editor' ).data( 'targeturl' );
        if ( redirectTarget !== undefined ) {
@@ -6,4 +7,4 @@
        } else {
                location.replace( 'index.php?title=' + mw.config.get( 
'wgMainPageTitle' ) );
        }
-}( jQuery ) );
+}() );
diff --git a/resources/mobile.special.mobileoptions.scripts.fontchanger/init.js 
b/resources/mobile.special.mobileoptions.scripts.fontchanger/init.js
index 847753b..836d160 100644
--- a/resources/mobile.special.mobileoptions.scripts.fontchanger/init.js
+++ b/resources/mobile.special.mobileoptions.scripts.fontchanger/init.js
@@ -1,4 +1,5 @@
-( function ( M, $ ) {
+ /* global $ */
+( function ( M ) {
        var FontChanger = M.require( 'mobile.fontchanger/FontChanger' );
 
        $( function () {
@@ -11,4 +12,4 @@
 
                fontChanger.insertBefore( saveLI );
        } );
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.special.mobileoptions.scripts/mobileoptions.js 
b/resources/mobile.special.mobileoptions.scripts/mobileoptions.js
index 56842ca..45e4a2e 100644
--- a/resources/mobile.special.mobileoptions.scripts/mobileoptions.js
+++ b/resources/mobile.special.mobileoptions.scripts/mobileoptions.js
@@ -1,4 +1,5 @@
-( function ( M, $ ) {
+ /* global $ */
+( function ( M ) {
        var View = M.require( 'mobile.startup/View' );
 
        /**
@@ -48,4 +49,4 @@
        }
 
        $( initLocalStorageElements );
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.special.nearby.scripts/nearby.js 
b/resources/mobile.special.nearby.scripts/nearby.js
index a2346fd..899bc36 100644
--- a/resources/mobile.special.nearby.scripts/nearby.js
+++ b/resources/mobile.special.nearby.scripts/nearby.js
@@ -1,4 +1,5 @@
-( function ( M, $ ) {
+ /* global $ */
+( function ( M ) {
        var Icon = M.require( 'mobile.startup/Icon' ),
                endpoint = mw.config.get( 'wgMFNearbyEndpoint' ),
                router = require( 'mediawiki.router' ),
@@ -58,7 +59,7 @@
                        }
                        // make sure, that the api object (if created above) is 
added to the options object used
                        // in the Nearby module
-                       opt = $.extend( {}, opt, options );
+                       opt = Object.assign( {}, opt, options );
 
                        // if Nearby is already created, use the existing one
                        if ( nearby ) {
@@ -76,7 +77,7 @@
                router.route( /^\/coord\/(-?\d+(?:\.\d+)?),(-?\d+(?:\.\d+)?)/, 
function ( lat, lon ) {
                        $icon.hide();
                        // Search with coordinates
-                       refresh( $.extend( {}, options, {
+                       refresh( Object.assign( {}, options, {
                                latitude: lat,
                                longitude: lon
                        } ) );
@@ -87,7 +88,7 @@
                 */
                router.route( /^\/page\/(.+)$/, function ( pageTitle ) {
                        $icon.hide();
-                       refresh( $.extend( {}, options, {
+                       refresh( Object.assign( {}, options, {
                                pageTitle: mw.Uri.decode( pageTitle )
                        } ) );
                } );
@@ -98,7 +99,7 @@
                 */
                function refreshCurrentLocation() {
                        $icon.show();
-                       refresh( $.extend( {}, options, {
+                       refresh( Object.assign( {}, options, {
                                useCurrentLocation: true
                        } ) );
                }
@@ -114,4 +115,4 @@
 
        } );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.special.uploads.scripts/uploads.js 
b/resources/mobile.special.uploads.scripts/uploads.js
index 5193fb9..5bc94e0 100644
--- a/resources/mobile.special.uploads.scripts/uploads.js
+++ b/resources/mobile.special.uploads.scripts/uploads.js
@@ -1,4 +1,5 @@
-( function ( M, $ ) {
+ /* global $ */
+( function ( M ) {
        var
                user = M.require( 'mobile.startup/user' ),
                PhotoList = M.require( 'mobile.gallery/PhotoList' ),
@@ -39,4 +40,4 @@
                }
        }
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.special.userlogin.scripts/userlogin.js 
b/resources/mobile.special.userlogin.scripts/userlogin.js
index 4a6513e..645e3ed 100644
--- a/resources/mobile.special.userlogin.scripts/userlogin.js
+++ b/resources/mobile.special.userlogin.scripts/userlogin.js
@@ -1,8 +1,9 @@
-( function ( $ ) {
+ /* global $ */
+( function () {
        // Most people on mobile devices are on a personal device so this 
property should be assumed.
        // To be consistent across platforms do same on desktop
        $( function () {
                $( '#wpRemember' ).prop( 'checked', true );
        } );
 
-}( jQuery ) );
+}() );
diff --git a/resources/mobile.startup/CtaDrawer.js 
b/resources/mobile.startup/CtaDrawer.js
index bfe04bf..7ffbc2a 100644
--- a/resources/mobile.startup/CtaDrawer.js
+++ b/resources/mobile.startup/CtaDrawer.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var Drawer = M.require( 'mobile.startup/Drawer' ),
                Icon = M.require( 'mobile.startup/Icon' ),
                Button = M.require( 'mobile.startup/Button' ),
@@ -25,7 +25,7 @@
                 * @cfg {Object} defaults.progressiveButton options for Button 
element for signing in
                 * @cfg {Object} defaults.actionAnchor options for Anchor 
element for signing up
                 */
-               defaults: $.extend( {}, Drawer.prototype.defaults, {
+               defaults: Object.assign( {}, Drawer.prototype.defaults, {
                        progressiveButton: new Button( {
                                progressive: true,
                                label: mw.msg( 
'mobile-frontend-watchlist-cta-button-login' )
@@ -39,7 +39,7 @@
                                additionalClassNames: 'cancel'
                        } ).options
                } ),
-               templatePartials: $.extend( {}, 
Drawer.prototype.templatePartials, {
+               templatePartials: Object.assign( {}, 
Drawer.prototype.templatePartials, {
                        icon: Icon.prototype.template,
                        button: Button.prototype.template,
                        anchor: Anchor.prototype.template
@@ -48,17 +48,17 @@
                /**
                 * @inheritdoc
                 */
-               events: $.extend( {}, Drawer.prototype.events, {
+               events: Object.assign( {}, Drawer.prototype.events, {
                        'click .hide': 'hide'
                } ),
 
                /** @inheritdoc */
                preRender: function () {
-                       var params = $.extend( {
+                       var params = Object.assign( {
                                        // use wgPageName as this includes the 
namespace if outside Main
                                        returnto: this.options.returnTo || 
mw.config.get( 'wgPageName' )
                                }, this.options.queryParams ),
-                               signupParams = $.extend( {
+                               signupParams = Object.assign( {
                                        type: 'signup'
                                }, this.options.signupQueryParams );
 
@@ -67,7 +67,7 @@
                                this.options.progressiveButton.href = 
mw.util.getUrl( 'Special:UserLogin', params );
                        }
                        if ( !this.options.actionAnchor.hasOwnProperty( 'href' 
) ) {
-                               this.options.actionAnchor.href = 
mw.util.getUrl( 'Special:UserLogin', $.extend( params, signupParams ) );
+                               this.options.actionAnchor.href = 
mw.util.getUrl( 'Special:UserLogin', Object.assign( params, signupParams ) );
                        }
                }
        } );
@@ -75,4 +75,4 @@
        M.define( 'mobile.startup/CtaDrawer', CtaDrawer )
                .deprecate( 'mobile.drawers/CtaDrawer' );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.startup/Drawer.js 
b/resources/mobile.startup/Drawer.js
index 295abc0..798678a 100644
--- a/resources/mobile.startup/Drawer.js
+++ b/resources/mobile.startup/Drawer.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
 
        var Panel = M.require( 'mobile.startup/Panel' ),
                Icon = M.require( 'mobile.startup/Icon' );
@@ -18,7 +18,7 @@
                 * @cfg {Object} defaults Default options hash.
                 * @cfg {string} defaults.cancelButton HTML of the button that 
closes the drawer.
                 */
-               defaults: $.extend( {}, Panel.prototype.defaults, {
+               defaults: Object.assign( {}, Panel.prototype.defaults, {
                        cancelButton: new Icon( {
                                tagName: 'a',
                                name: 'close-invert',
@@ -37,7 +37,7 @@
                 * @property {boolean}
                 */
                closeOnScroll: true,
-               events: $.extend( {}, Panel.prototype.events, {
+               events: Object.assign( {}, Panel.prototype.events, {
                        click: 'stopPropagation'
                } ),
 
@@ -89,4 +89,4 @@
        M.define( 'mobile.startup/Drawer', Drawer )
                .deprecate( 'mobile.drawers/Drawer' );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.startup/Icon.js b/resources/mobile.startup/Icon.js
index 79e920b..be4cc03 100644
--- a/resources/mobile.startup/Icon.js
+++ b/resources/mobile.startup/Icon.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
 
        var View = M.require( 'mobile.startup/View' );
 
@@ -109,4 +109,4 @@
 
        M.define( 'mobile.startup/Icon', Icon );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.startup/Overlay.js 
b/resources/mobile.startup/Overlay.js
index bd07937..7462263 100644
--- a/resources/mobile.startup/Overlay.js
+++ b/resources/mobile.startup/Overlay.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
 
        var View = M.require( 'mobile.startup/View' ),
                Icon = M.require( 'mobile.startup/Icon' ),
@@ -321,4 +321,4 @@
        M.define( 'mobile.startup/Overlay', Overlay )
                .deprecate( 'mobile.overlays/Overlay' );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.startup/OverlayManager.js 
b/resources/mobile.startup/OverlayManager.js
index 8689cff..539757d 100644
--- a/resources/mobile.startup/OverlayManager.js
+++ b/resources/mobile.startup/OverlayManager.js
@@ -1,4 +1,5 @@
-( function ( M, $ ) {
+ /* global $ */
+( function ( M ) {
        /**
         * Manages opening and closing overlays when the URL hash changes to one
         * of the registered values (see OverlayManager.add()).
@@ -241,4 +242,4 @@
 
        M.define( 'mobile.startup/OverlayManager', OverlayManager ); // 
resource-modules-disable-line
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.startup/Page.js b/resources/mobile.startup/Page.js
index b99302c..668ef91 100644
--- a/resources/mobile.startup/Page.js
+++ b/resources/mobile.startup/Page.js
@@ -1,4 +1,4 @@
-( function ( HTML, M, $ ) {
+( function ( HTML, M ) {
 
        var time = M.require( 'mobile.startup/time' ),
                View = M.require( 'mobile.startup/View' ),
@@ -354,7 +354,7 @@
                }
 
                return new Page(
-                       $.extend( resp, {
+                       Object.assign( resp, {
                                id: resp.pageid,
                                isMissing: !!resp.missing,
                                url: mw.util.getUrl( resp.title ),
@@ -364,4 +364,4 @@
        };
        M.define( 'mobile.startup/Page', Page );
 
-}( mw.html, mw.mobileFrontend, jQuery ) );
+}( mw.html, mw.mobileFrontend ) );
diff --git a/resources/mobile.startup/PageGateway.js 
b/resources/mobile.startup/PageGateway.js
index 52c047d..21103c6 100644
--- a/resources/mobile.startup/PageGateway.js
+++ b/resources/mobile.startup/PageGateway.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var sectionTemplate = mw.template.get( 'mobile.startup', 
'Section.hogan' ),
                cache = {};
 
@@ -148,7 +148,7 @@
                                                // no protection level. When an 
array this means there is no protection level set.
                                                // So to keep the data type 
consistent either use the predefined protection level, or
                                                // extend it with what is 
returned by API.
-                                               protection = $.isArray( 
mv.protection ) ? protection : $.extend( protection, mv.protection );
+                                               protection = $.isArray( 
mv.protection ) ? protection : Object.assign( protection, mv.protection );
                                                resolveObj = {
                                                        title: title,
                                                        id: mv.id,
@@ -167,7 +167,7 @@
                                                };
                                                // Add non-anonymous user 
information
                                                if ( lastModified ) {
-                                                       $.extend( resolveObj, {
+                                                       Object.assign( 
resolveObj, {
                                                                
lastModifiedUserName: lastModified.name,
                                                                
lastModifiedUserGender: lastModified.gender
                                                        } );
@@ -311,4 +311,4 @@
        };
 
        M.define( 'mobile.startup/PageGateway', PageGateway );
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.startup/PageList.js 
b/resources/mobile.startup/PageList.js
index 5e6f8d7..1aee6b5 100644
--- a/resources/mobile.startup/PageList.js
+++ b/resources/mobile.startup/PageList.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
 
        var View = M.require( 'mobile.startup/View' ),
                browser = M.require( 'mobile.startup/Browser' ).getSingleton();
@@ -67,4 +67,4 @@
        M.define( 'mobile.startup/PageList', PageList )
                .deprecate( 'mobile.pagelist/PageList' );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.startup/Skin.js b/resources/mobile.startup/Skin.js
index 3aaf7be..89bc1ed 100644
--- a/resources/mobile.startup/Skin.js
+++ b/resources/mobile.startup/Skin.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
 
        var browser = M.require( 'mobile.startup/Browser' ).getSingleton(),
                View = M.require( 'mobile.startup/View' ),
@@ -373,4 +373,4 @@
        Skin.getSectionId = getSectionId;
        M.define( 'mobile.startup/Skin', Skin ); // 
resource-modules-disable-line
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.startup/View.js b/resources/mobile.startup/View.js
index b66927a..136a1bc 100644
--- a/resources/mobile.startup/View.js
+++ b/resources/mobile.startup/View.js
@@ -1,4 +1,5 @@
-( function ( M, $ ) {
+ /* global $ */
+( function ( M ) {
        var
                // Cached regex to split keys for `delegate`.
                delegateEventSplitter = /^(\S+)\s*(.*)$/,
@@ -160,7 +161,7 @@
                        var self = this;
 
                        OO.EventEmitter.call( this );
-                       options = $.extend( {}, this.defaults, options );
+                       options = Object.assign( {}, this.defaults, options );
                        this.options = options;
                        // Assign a unique id for dom events binding/unbinding
                        this.cid = uniqueId( 'view' );
@@ -229,7 +230,7 @@
                 */
                render: function ( data ) {
                        var html;
-                       $.extend( this.options, data );
+                       Object.assign( this.options, data );
                        this.preRender();
                        this.undelegateEvents();
                        if ( this.template && !this.options.enhance ) {
@@ -356,4 +357,4 @@
        M.define( 'mobile.startup/View', View )
                .deprecate( 'mobile.view/View' );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.startup/browser.js 
b/resources/mobile.startup/browser.js
index faa2c23..5697d70 100644
--- a/resources/mobile.startup/browser.js
+++ b/resources/mobile.startup/browser.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var browser;
 
        /**
@@ -182,4 +182,4 @@
        M.define( 'mobile.startup/Browser', Browser )
                .deprecate( 'mobile.browser/Browser' );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.startup/icons.js 
b/resources/mobile.startup/icons.js
index 7e4d70c..859cb93 100644
--- a/resources/mobile.startup/icons.js
+++ b/resources/mobile.startup/icons.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
 
        var Icon = M.require( 'mobile.startup/Icon' );
 
@@ -27,7 +27,7 @@
                spinner: function ( options ) {
                        options = options || {};
 
-                       return new Icon( $.extend( options, {
+                       return new Icon( Object.assign( options, {
                                name: 'spinner',
                                label: mw.msg( 
'mobile-frontend-loading-message' ),
                                additionalClassNames: 'spinner loading'
@@ -35,4 +35,4 @@
                }
        } );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.startup/oo-extend.js 
b/resources/mobile.startup/oo-extend.js
index c852bfa..de3fa08 100644
--- a/resources/mobile.startup/oo-extend.js
+++ b/resources/mobile.startup/oo-extend.js
@@ -20,5 +20,4 @@
                        Child.prototype[key] = prototype[key];
                }
        };
-
 }() );
diff --git a/resources/mobile.startup/time.js b/resources/mobile.startup/time.js
index 54d87d7..f2a2c89 100644
--- a/resources/mobile.startup/time.js
+++ b/resources/mobile.startup/time.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var units = [ 'seconds', 'minutes', 'hours', 'days', 'months', 'years' 
],
                limits = [ 1, 60, 3600, 86400, 2592000, 31536000 ];
 
@@ -140,4 +140,4 @@
                isRecent: isRecent
        } ).deprecate( 'mobile.modifiedBar/time' );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.startup/toast.js 
b/resources/mobile.startup/toast.js
index 91687af..3424c37 100644
--- a/resources/mobile.startup/toast.js
+++ b/resources/mobile.startup/toast.js
@@ -27,7 +27,7 @@
                        };
                }
 
-               options = $.extend( {
+               options = Object.assign( {
                        tag: 'toast'
                }, options );
 
diff --git a/resources/mobile.startup/user.js b/resources/mobile.startup/user.js
index 1aca1fa..0e3b048 100644
--- a/resources/mobile.startup/user.js
+++ b/resources/mobile.startup/user.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        /**
         * Utility library for looking up details on the current user
         * @class user
@@ -55,4 +55,4 @@
        M.define( 'mobile.startup/user', user )
                .deprecate( 'mobile.user/user' );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.startup/util.js b/resources/mobile.startup/util.js
index 473722e..65e5d72 100644
--- a/resources/mobile.startup/util.js
+++ b/resources/mobile.startup/util.js
@@ -8,7 +8,7 @@
         */
        util = {
                /**
-                * Escape dots and colons in a hash, jQuery doesn't like them 
beause they
+                * Escape dots and colons in a hash doesn't like them beause 
they
                 * look like CSS classes and pseudoclasses. See
                 * http://bugs.jquery.com/ticket/5241
                 * 
http://stackoverflow.com/questions/350292/how-do-i-get-jquery-to-select-elements-with-a-period-in-their-id
@@ -24,4 +24,4 @@
 
        M.define( 'mobile.startup/util', util );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.talk.overlays/TalkOverlay.js 
b/resources/mobile.talk.overlays/TalkOverlay.js
index c09641e..1d94b6e 100644
--- a/resources/mobile.talk.overlays/TalkOverlay.js
+++ b/resources/mobile.talk.overlays/TalkOverlay.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var TalkOverlayBase = M.require( 'mobile.talk.overlays/TalkOverlayBase' 
),
                Page = M.require( 'mobile.startup/Page' ),
                Anchor = M.require( 'mobile.startup/Anchor' ),
@@ -16,7 +16,7 @@
        }
 
        OO.mfExtend( TalkOverlay, TalkOverlayBase, {
-               templatePartials: $.extend( {}, 
TalkOverlayBase.prototype.templatePartials, {
+               templatePartials: Object.assign( {}, 
TalkOverlayBase.prototype.templatePartials, {
                        content: mw.template.get( 'mobile.talk.overlays', 
'content.hogan' )
                } ),
                /**
@@ -33,7 +33,7 @@
                 * generating header buttons. Default list includes an 'add' 
button, which opens
                 * a new talk overlay.
                 */
-               defaults: $.extend( {}, TalkOverlayBase.prototype.defaults, {
+               defaults: Object.assign( {}, 
TalkOverlayBase.prototype.defaults, {
                        headings: undefined,
                        heading: '<strong>' + mw.msg( 
'mobile-frontend-talk-overlay-header' ) + '</strong>',
                        leadHeading: mw.msg( 
'mobile-frontend-talk-overlay-lead-header' ),
@@ -155,4 +155,4 @@
 
        M.define( 'mobile.talk.overlays/TalkOverlay', TalkOverlay ); // 
resource-modules-disable-line
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.talk.overlays/TalkSectionAddOverlay.js 
b/resources/mobile.talk.overlays/TalkSectionAddOverlay.js
index 6ac3b74..8dc2584 100644
--- a/resources/mobile.talk.overlays/TalkSectionAddOverlay.js
+++ b/resources/mobile.talk.overlays/TalkSectionAddOverlay.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var TalkOverlayBase = M.require( 'mobile.talk.overlays/TalkOverlayBase' 
),
                toast = M.require( 'mobile.startup/toast' ),
                Icon = M.require( 'mobile.startup/Icon' );
@@ -31,7 +31,7 @@
                 * content to talk page content.
                 * @cfg {string} defaults.editingMsg Label for button which 
submits a new talk page topic.
                 */
-               defaults: $.extend( {}, TalkOverlayBase.prototype.defaults, {
+               defaults: Object.assign( {}, 
TalkOverlayBase.prototype.defaults, {
                        cancelMsg: mw.msg( 'mobile-frontend-editor-cancel' ),
                        topicTitlePlaceHolder: mw.msg( 
'mobile-frontend-talk-add-overlay-subject-placeholder' ),
                        topicContentPlaceHolder: mw.msg( 
'mobile-frontend-talk-add-overlay-content-placeholder' ),
@@ -44,11 +44,11 @@
                        } ).toHtmlString()
                } ),
                template: mw.template.get( 'mobile.talk.overlays', 
'SectionAddOverlay.hogan' ),
-               templatePartials: $.extend( {}, 
TalkOverlayBase.prototype.templatePartials, {
+               templatePartials: Object.assign( {}, 
TalkOverlayBase.prototype.templatePartials, {
                        contentHeader: mw.template.get( 'mobile.talk.overlays', 
'SectionAddOverlay/contentHeader.hogan' ),
                        saveHeader: mw.template.get( 'mobile.editor.common', 
'saveHeader.hogan' )
                } ),
-               events: $.extend( {}, TalkOverlayBase.prototype.events, {
+               events: Object.assign( {}, TalkOverlayBase.prototype.events, {
                        'input .wikitext-editor, .summary': 'onTextInput',
                        'change .wikitext-editor, .summary': 'onTextInput',
                        'click .confirm-save': 'onSaveClick'
@@ -178,4 +178,4 @@
 
        M.define( 'mobile.talk.overlays/TalkSectionAddOverlay', 
TalkSectionAddOverlay ); // resource-modules-disable-line
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.talk.overlays/TalkSectionOverlay.js 
b/resources/mobile.talk.overlays/TalkSectionOverlay.js
index aa358c6..15e18a3 100644
--- a/resources/mobile.talk.overlays/TalkSectionOverlay.js
+++ b/resources/mobile.talk.overlays/TalkSectionOverlay.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var TalkOverlayBase = M.require( 'mobile.talk.overlays/TalkOverlayBase' 
),
                popup = M.require( 'mobile.startup/toast' ),
                user = M.require( 'mobile.startup/user' ),
@@ -18,7 +18,7 @@
        }
 
        OO.mfExtend( TalkSectionOverlay, TalkOverlayBase, {
-               templatePartials: $.extend( {}, 
TalkOverlayBase.prototype.templatePartials, {
+               templatePartials: Object.assign( {}, 
TalkOverlayBase.prototype.templatePartials, {
                        header: mw.template.get( 'mobile.talk.overlays', 
'Section/header.hogan' ),
                        content: mw.template.get( 'mobile.talk.overlays', 
'Section/content.hogan' )
                } ),
@@ -31,7 +31,7 @@
                 * @cfg {string} defaults.info Message that informs the user 
their talk reply will be
                 * automatically signed.
                 */
-               defaults: $.extend( {}, TalkOverlayBase.prototype.defaults, {
+               defaults: Object.assign( {}, 
TalkOverlayBase.prototype.defaults, {
                        saveButton: new Button( {
                                block: true,
                                additionalClassNames: 'save-button',
@@ -43,7 +43,7 @@
                        reply: mw.msg( 'mobile-frontend-talk-reply' ),
                        info: mw.msg( 'mobile-frontend-talk-reply-info' )
                } ),
-               events: $.extend( {}, TalkOverlayBase.prototype.events, {
+               events: Object.assign( {}, TalkOverlayBase.prototype.events, {
                        'focus textarea': 'onFocusTextarea',
                        'click .save-button': 'onSaveClick'
                } ),
@@ -153,4 +153,4 @@
        } );
 
        M.define( 'mobile.talk.overlays/TalkSectionOverlay', TalkSectionOverlay 
); // resource-modules-disable-line
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.toggle/toggle.js 
b/resources/mobile.toggle/toggle.js
index d4c8e34..677abad 100644
--- a/resources/mobile.toggle/toggle.js
+++ b/resources/mobile.toggle/toggle.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var browser = M.require( 'mobile.startup/Browser' ).getSingleton(),
                escapeHash = M.require( 'mobile.startup/util' ).escapeHash,
                arrowOptions = {
@@ -360,4 +360,4 @@
 
        M.define( 'mobile.toggle/Toggler', Toggler ); // 
resource-modules-disable-line
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.watchlist/WatchList.js 
b/resources/mobile.watchlist/WatchList.js
index 5834ca4..51c09e5 100644
--- a/resources/mobile.watchlist/WatchList.js
+++ b/resources/mobile.watchlist/WatchList.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var WatchstarPageList = M.require( 
'mobile.pagelist.scripts/WatchstarPageList' ),
                InfiniteScroll = M.require( 
'mobile.infiniteScroll/InfiniteScroll' ),
                WatchListGateway = M.require( 
'mobile.watchlist/WatchListGateway' );
@@ -87,4 +87,4 @@
 
        M.define( 'mobile.watchlist/WatchList', WatchList ); // 
resource-modules-disable-line
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.watchlist/WatchListGateway.js 
b/resources/mobile.watchlist/WatchListGateway.js
index c0c3799..15dd0b7 100644
--- a/resources/mobile.watchlist/WatchListGateway.js
+++ b/resources/mobile.watchlist/WatchListGateway.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var Page = M.require( 'mobile.startup/Page' ),
                extendSearchParams = M.require( 
'mobile.search.util/extendSearchParams' );
 
@@ -109,4 +109,4 @@
 
        M.define( 'mobile.watchlist/WatchListGateway', WatchListGateway );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/resources/mobile.watchstar/WatchstarGateway.js 
b/resources/mobile.watchstar/WatchstarGateway.js
index 14cb643..d1aef08 100644
--- a/resources/mobile.watchstar/WatchstarGateway.js
+++ b/resources/mobile.watchstar/WatchstarGateway.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        /**
         * API for managing clickable watchstar
         *
@@ -112,4 +112,4 @@
 
        M.define( 'mobile.watchstar/WatchstarGateway', WatchstarGateway );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.editor.api/test_EditorGateway.js 
b/tests/qunit/mobile.editor.api/test_EditorGateway.js
index a16d23a..1868e67 100644
--- a/tests/qunit/mobile.editor.api/test_EditorGateway.js
+++ b/tests/qunit/mobile.editor.api/test_EditorGateway.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var EditorGateway = M.require( 'mobile.editor.api/EditorGateway' );
 
        QUnit.module( 'MobileFrontend mobile.editor.api/EditorGateway', {
@@ -628,4 +628,4 @@
                } );
        } );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.editor.overlay/test_EditorOverlay.js 
b/tests/qunit/mobile.editor.overlay/test_EditorOverlay.js
index d6bec5d..a67c0ce 100644
--- a/tests/qunit/mobile.editor.overlay/test_EditorOverlay.js
+++ b/tests/qunit/mobile.editor.overlay/test_EditorOverlay.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var EditorGateway = M.require( 'mobile.editor.api/EditorGateway' ),
                EditorOverlay = M.require( 
'mobile.editor.overlay/EditorOverlay' );
 
@@ -103,4 +103,4 @@
                assert.ok( editorOverlay.$anonWarning.length > 0, 
'Editorwarning (IP will be saved) visible.' );
                assert.ok( editorOverlay.$( '.anonymous' ).length > 0, 
'Continue login has a second class.' );
        } );
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.infiniteScroll/test_InfiniteScroll.js 
b/tests/qunit/mobile.infiniteScroll/test_InfiniteScroll.js
index d8fb044..cac8ce6 100644
--- a/tests/qunit/mobile.infiniteScroll/test_InfiniteScroll.js
+++ b/tests/qunit/mobile.infiniteScroll/test_InfiniteScroll.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var InfiniteScroll = M.require( 'mobile.infiniteScroll/InfiniteScroll' 
);
 
        QUnit.module( 'MobileFrontend InfiniteScroll', {
@@ -60,4 +60,4 @@
                assert.strictEqual( emitSpy.called, false, 'emit should not be 
called' );
        } );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.languages.structured/test_util.js 
b/tests/qunit/mobile.languages.structured/test_util.js
index 369aee1..22682d1 100644
--- a/tests/qunit/mobile.languages.structured/test_util.js
+++ b/tests/qunit/mobile.languages.structured/test_util.js
@@ -1,4 +1,4 @@
-( function ( $, M ) {
+( function ( M ) {
        var util = M.require( 'mobile.languages.structured/util' );
 
        QUnit.module( 'MobileFrontend: Structured LanguageOverlay', {
@@ -203,4 +203,4 @@
                } );
        } );
 
-}( jQuery, mw.mobileFrontend ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.mediaViewer/test_ImageOverlay.js 
b/tests/qunit/mobile.mediaViewer/test_ImageOverlay.js
index 6928b13..d700503 100644
--- a/tests/qunit/mobile.mediaViewer/test_ImageOverlay.js
+++ b/tests/qunit/mobile.mediaViewer/test_ImageOverlay.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var ImageOverlay = M.require( 'mobile.mediaViewer/ImageOverlay' ),
                image = {
                        descriptionurl: 
'https://commons.wikimedia.org/wiki/File:The_Montgomery,_San_Francisco.jpg',
@@ -33,4 +33,4 @@
                assert.equal( imageOverlay.$el.find( 'img' ).length, 1, 'Image 
is present.' );
        } );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.nearby/test_Nearby.js 
b/tests/qunit/mobile.nearby/test_Nearby.js
index a3b743a..502a79c 100644
--- a/tests/qunit/mobile.nearby/test_Nearby.js
+++ b/tests/qunit/mobile.nearby/test_Nearby.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
 
        var NearbyGateway = M.require( 'mobile.nearby/NearbyGateway' ),
                api = new mw.Api(),
@@ -158,4 +158,4 @@
                assert.ok( this.spy.calledWithMatch( pageTitle, 1000 ), 'Check 
API got called' );
        } );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.nearby/test_NearbyGateway.js 
b/tests/qunit/mobile.nearby/test_NearbyGateway.js
index 350621c..b2ba143 100644
--- a/tests/qunit/mobile.nearby/test_NearbyGateway.js
+++ b/tests/qunit/mobile.nearby/test_NearbyGateway.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var m,
                NearbyGateway = M.require( 'mobile.nearby/NearbyGateway' );
 
@@ -115,4 +115,4 @@
                } );
        } );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.pagelist.scripts/test_WatchstarPageList.js 
b/tests/qunit/mobile.pagelist.scripts/test_WatchstarPageList.js
index d3c618e..0dcce05 100644
--- a/tests/qunit/mobile.pagelist.scripts/test_WatchstarPageList.js
+++ b/tests/qunit/mobile.pagelist.scripts/test_WatchstarPageList.js
@@ -1,4 +1,4 @@
-( function ( $, M ) {
+( function ( M ) {
 
        var PageList = M.require( 'mobile.pagelist.scripts/WatchstarPageList' ),
                user = M.require( 'mobile.startup/user' ),
@@ -47,4 +47,4 @@
                assert.strictEqual( pl.$el.find( '.' + 
watchIcon.getGlyphClassName() ).length, 1, '1 of articles is marked as watched' 
);
        } );
 
-}( jQuery, mw.mobileFrontend ) );
+}( mw.mobileFrontend ) );
diff --git 
a/tests/qunit/mobile.references.gateway/test_ReferencesHtmlScraperGateway.js 
b/tests/qunit/mobile.references.gateway/test_ReferencesHtmlScraperGateway.js
index f4f1f19..78e0058 100644
--- a/tests/qunit/mobile.references.gateway/test_ReferencesHtmlScraperGateway.js
+++ b/tests/qunit/mobile.references.gateway/test_ReferencesHtmlScraperGateway.js
@@ -1,4 +1,4 @@
-( function ( $, M ) {
+( function ( M ) {
 
        var ReferencesHtmlScraperGateway = M.require(
                        
'mobile.references.gateway/ReferencesHtmlScraperGateway' ),
@@ -35,4 +35,4 @@
                } );
        } );
 
-}( jQuery, mw.mobileFrontend ) );
+}( mw.mobileFrontend ) );
diff --git 
a/tests/qunit/mobile.references.gateway/test_ReferencesMobileViewGateway.js 
b/tests/qunit/mobile.references.gateway/test_ReferencesMobileViewGateway.js
index 51ef4b7..fcfefa6 100644
--- a/tests/qunit/mobile.references.gateway/test_ReferencesMobileViewGateway.js
+++ b/tests/qunit/mobile.references.gateway/test_ReferencesMobileViewGateway.js
@@ -1,4 +1,5 @@
-( function ( $, M ) {
+/* global $ */
+( function ( M ) {
 
        var ReferencesMobileViewGateway = M.require(
                        'mobile.references.gateway/ReferencesMobileViewGateway'
@@ -98,4 +99,4 @@
                        done();
                } );
        } );
-}( jQuery, mw.mobileFrontend ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.references/test_ReferencesDrawer.js 
b/tests/qunit/mobile.references/test_ReferencesDrawer.js
index 0022d67..317b4b1 100644
--- a/tests/qunit/mobile.references/test_ReferencesDrawer.js
+++ b/tests/qunit/mobile.references/test_ReferencesDrawer.js
@@ -1,4 +1,5 @@
-( function ( $, M ) {
+/* global $ */
+( function ( M ) {
 
        var ReferenceDrawer = M.require( 'mobile.references/ReferencesDrawer' ),
                ReferencesGateway = M.require( 
'mobile.references.gateway/ReferencesGateway' ),
@@ -71,4 +72,4 @@
                } );
        } );
 
-}( jQuery, mw.mobileFrontend ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.search.api/test_SearchGateway.js 
b/tests/qunit/mobile.search.api/test_SearchGateway.js
index aed4d97..0d22d41 100644
--- a/tests/qunit/mobile.search.api/test_SearchGateway.js
+++ b/tests/qunit/mobile.search.api/test_SearchGateway.js
@@ -1,4 +1,5 @@
-( function ( $, M ) {
+/* global $ */
+( function ( M ) {
 
        var SearchGateway = M.require( 'mobile.search.api/SearchGateway' );
 
@@ -137,4 +138,4 @@
                } );
 
        } );
-}( jQuery, mw.mobileFrontend ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.search.util/test_extendSearchParams.js 
b/tests/qunit/mobile.search.util/test_extendSearchParams.js
index f312c22..82dd280 100644
--- a/tests/qunit/mobile.search.util/test_extendSearchParams.js
+++ b/tests/qunit/mobile.search.util/test_extendSearchParams.js
@@ -1,4 +1,5 @@
-( function ( M, $ ) {
+/* global $ */
+( function ( M ) {
 
        var extendSearchParams = M.require( 
'mobile.search.util/extendSearchParams' );
 
@@ -109,4 +110,4 @@
                assert.deepEqual( params, expectedParams );
        } );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.startup/test_Overlay.js 
b/tests/qunit/mobile.startup/test_Overlay.js
index e81825c..c12f1cb 100644
--- a/tests/qunit/mobile.startup/test_Overlay.js
+++ b/tests/qunit/mobile.startup/test_Overlay.js
@@ -1,4 +1,4 @@
-( function ( M, $ ) {
+( function ( M ) {
        var Overlay = M.require( 'mobile.startup/Overlay' );
 
        QUnit.module( 'MobileFrontend: Overlay.js', {
@@ -25,7 +25,7 @@
                }
 
                OO.mfExtend( TestOverlay, Overlay, {
-                       templatePartials: $.extend( 
Overlay.prototype.templatePartials, {
+                       templatePartials: Object.assign( 
Overlay.prototype.templatePartials, {
                                content: mw.template.compile( '<div 
class="content">YO</div>', 'hogan' )
                        } )
                } );
@@ -46,4 +46,4 @@
                this.clock.tick( 1000 );
                assert.strictEqual( overlay.$el[ 0 ].parentNode, null, 'No 
longer in DOM' );
        } );
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.startup/test_OverlayManager.js 
b/tests/qunit/mobile.startup/test_OverlayManager.js
index 075d28d..87bf0b0 100644
--- a/tests/qunit/mobile.startup/test_OverlayManager.js
+++ b/tests/qunit/mobile.startup/test_OverlayManager.js
@@ -1,4 +1,5 @@
-( function ( M, $ ) {
+/* global $ */
+( function ( M ) {
        var OverlayManager = M.require( 'mobile.startup/OverlayManager' ),
                fakeRouter, overlayManager;
 
@@ -12,7 +13,7 @@
                                        return true;
                                };
                                this.sandbox.spy( fakeOverlay, 'hide' );
-                               $.extend( fakeOverlay, options );
+                               Object.assign( fakeOverlay, options );
                                return fakeOverlay;
                        };
 
@@ -185,4 +186,4 @@
                fakeRouter.emit( 'route', ev );
                assert.ok( ev.isDefaultPrevented(), 'prevent route change' );
        } );
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.startup/test_Page.js 
b/tests/qunit/mobile.startup/test_Page.js
index a2b1c40..0defd45 100644
--- a/tests/qunit/mobile.startup/test_Page.js
+++ b/tests/qunit/mobile.startup/test_Page.js
@@ -1,4 +1,5 @@
-( function ( M, $ ) {
+/* global $ */
+( function ( M ) {
        var Page = M.require( 'mobile.startup/Page' );
 
        QUnit.module( 'MobileFrontend Page' );
@@ -161,4 +162,4 @@
                } );
        } );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.startup/test_PageGateway.js 
b/tests/qunit/mobile.startup/test_PageGateway.js
index 436b2db..9093a8f 100644
--- a/tests/qunit/mobile.startup/test_PageGateway.js
+++ b/tests/qunit/mobile.startup/test_PageGateway.js
@@ -1,4 +1,5 @@
-( function ( M, $ ) {
+/* global $ */
+( function ( M ) {
        var pageGateway,
                PageGateway = M.require( 'mobile.startup/PageGateway' );
 
@@ -356,7 +357,7 @@
        QUnit.test( '#getPageLanguages', 1, function ( assert ) {
                var spy = this.sandbox.spy( this.api, 'get' );
                // prevent rogue ajax request
-               this.sandbox.stub( jQuery, 'ajax' ).returns( 
$.Deferred().resolve() );
+               this.sandbox.stub( 'ajax' ).returns( $.Deferred().resolve() );
                pageGateway.getPageLanguages( 'Title', 'fr' );
                assert.ok(
                        spy.calledWith( {
@@ -486,4 +487,4 @@
                } );
        } );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.startup/test_Skin.js 
b/tests/qunit/mobile.startup/test_Skin.js
index 7cab79d..d5b2959 100644
--- a/tests/qunit/mobile.startup/test_Skin.js
+++ b/tests/qunit/mobile.startup/test_Skin.js
@@ -1,4 +1,5 @@
-( function ( M, $ ) {
+/* global $ */
+( function ( M ) {
        var Page = M.require( 'mobile.startup/Page' ),
                Skin = M.require( 'mobile.startup/Skin' );
 
@@ -117,4 +118,4 @@
                );
        } );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.startup/test_View.js 
b/tests/qunit/mobile.startup/test_View.js
index a9ad6f4..68de1c8 100644
--- a/tests/qunit/mobile.startup/test_View.js
+++ b/tests/qunit/mobile.startup/test_View.js
@@ -1,4 +1,5 @@
-( function ( M, $ ) {
+/* global $ */
+( function ( M ) {
 
        var View = M.require( 'mobile.startup/View' );
 
@@ -32,7 +33,7 @@
                assert.strictEqual( view.$el[ 0 ].tagName.toUpperCase(), 
'BODY', 'assign proper jQuery object to $el' );
        } );
 
-       QUnit.test( 'View, jQuery proxy functions', 10, function ( assert ) {
+       QUnit.test( 'View proxy functions', 10, function ( assert ) {
                var self = this,
                        view = new View( {
                                el: 'body'
@@ -151,7 +152,7 @@
                }
 
                OO.mfExtend( ChildView, ParentView, {
-                       templatePartials: $.extend( 
ParentView.prototype.templatePartials, {
+                       templatePartials: Object.assign( 
ParentView.prototype.templatePartials, {
                                b: 3,
                                c: 4
                        } )
@@ -184,7 +185,7 @@
                }
 
                OO.mfExtend( ChildView, ParentView, {
-                       defaults: $.extend( ParentView.prototype.defaults, {
+                       defaults: Object.assign( ParentView.prototype.defaults, 
{
                                b: 3,
                                c: 4
                        } )
@@ -335,4 +336,4 @@
                assert.strictEqual( view.$( 'span' ).length, 0, 'span 
disappeared' );
        } );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.startup/test_browser.js 
b/tests/qunit/mobile.startup/test_browser.js
index 319a731..79b137a 100644
--- a/tests/qunit/mobile.startup/test_browser.js
+++ b/tests/qunit/mobile.startup/test_browser.js
@@ -1,4 +1,5 @@
-( function ( $, M ) {
+/* global $ */
+( function ( M ) {
        var Browser = M.require( 'mobile.startup/Browser' ),
                // Use an empty html element to avoid calling methods in 
_fixIosLandscapeBug
                $html = $( '<html>' );
@@ -58,4 +59,4 @@
 
        } );
 
-}( jQuery, mw.mobileFrontend ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.talk.overlays/test_TalkOverlay.js 
b/tests/qunit/mobile.talk.overlays/test_TalkOverlay.js
index df367ec..3d1f168 100644
--- a/tests/qunit/mobile.talk.overlays/test_TalkOverlay.js
+++ b/tests/qunit/mobile.talk.overlays/test_TalkOverlay.js
@@ -1,4 +1,5 @@
-( function ( M, $ ) {
+/* global $ */
+( function ( M ) {
 
        var PageGateway = M.require( 'mobile.startup/PageGateway' ),
                TalkOverlay = M.require( 'mobile.talk.overlays/TalkOverlay' );
@@ -80,4 +81,4 @@
                        'Check the header knows it is not empty.' );
        } );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.talk.overlays/test_TalkSectionAddOverlay.js 
b/tests/qunit/mobile.talk.overlays/test_TalkSectionAddOverlay.js
index 40f5265..c2624fe 100644
--- a/tests/qunit/mobile.talk.overlays/test_TalkSectionAddOverlay.js
+++ b/tests/qunit/mobile.talk.overlays/test_TalkSectionAddOverlay.js
@@ -1,4 +1,5 @@
-( function ( M, $ ) {
+/* global $ */
+( function ( M ) {
 
        var TalkSectionAddOverlay = M.require( 
'mobile.talk.overlays/TalkSectionAddOverlay' );
 
@@ -30,4 +31,4 @@
                assert.strictEqual( overlay._saveHit, true, 'The save was 
recognized' );
        } );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.talk.overlays/test_TalkSectionOverlay.js 
b/tests/qunit/mobile.talk.overlays/test_TalkSectionOverlay.js
index 3eb3d2c..a6bf61a 100644
--- a/tests/qunit/mobile.talk.overlays/test_TalkSectionOverlay.js
+++ b/tests/qunit/mobile.talk.overlays/test_TalkSectionOverlay.js
@@ -1,4 +1,5 @@
-( function ( M, $ ) {
+/* global $ */
+( function ( M ) {
 
        var TalkSectionOverlay = M.require( 
'mobile.talk.overlays/TalkSectionOverlay' ),
                user = M.require( 'mobile.startup/user' ),
@@ -89,4 +90,4 @@
                assert.ok( overlay.$( '.comment' ).length > 0, 'There is a 
visible comment box' );
        } );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.toggle/test_toggle.js 
b/tests/qunit/mobile.toggle/test_toggle.js
index 89584fd..5db7379 100644
--- a/tests/qunit/mobile.toggle/test_toggle.js
+++ b/tests/qunit/mobile.toggle/test_toggle.js
@@ -1,4 +1,5 @@
-( function ( M, $ ) {
+/* global $ */
+( function ( M ) {
 
        var toggle,
                sectionHtml = mw.template.get( 'tests.mobilefrontend', 
'section.hogan' ).render(),
@@ -152,7 +153,7 @@
        QUnit.test( 'Pressing space/ enter toggles a heading', 3, function ( 
assert ) {
                var $section = this.$container.find( '#section_1' ),
                        $content = this.$container.find( '.collapsible-block' 
).eq( 1 ),
-                       ev = jQuery.Event( 'keypress' );
+                       ev = $.Event( 'keypress' );
 
                assert.strictEqual( $content.hasClass( 'open-block' ), false, 
'check content is hidden at start' );
 
@@ -321,4 +322,4 @@
 
        } );
 
-}( mw.mobileFrontend, jQuery ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.watchlist/test_WatchList.js 
b/tests/qunit/mobile.watchlist/test_WatchList.js
index 428a89e..587b280 100644
--- a/tests/qunit/mobile.watchlist/test_WatchList.js
+++ b/tests/qunit/mobile.watchlist/test_WatchList.js
@@ -1,4 +1,5 @@
-( function ( $, M ) {
+/* global $ */
+( function ( M ) {
 
        var WatchList = M.require( 'mobile.watchlist/WatchList' ),
                user = M.require( 'mobile.startup/user' ),
@@ -44,4 +45,4 @@
                assert.strictEqual( pl.$el.find( '.' + 
watchIcon.getGlyphClassName() ).length, 3, '...and all are marked as watched.' 
);
        } );
 
-}( jQuery, mw.mobileFrontend ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.watchlist/test_WatchListGateway.js 
b/tests/qunit/mobile.watchlist/test_WatchListGateway.js
index 5d31283..2aa0e00 100644
--- a/tests/qunit/mobile.watchlist/test_WatchListGateway.js
+++ b/tests/qunit/mobile.watchlist/test_WatchListGateway.js
@@ -1,4 +1,5 @@
-( function ( $, M ) {
+/* global $ */
+( function ( M ) {
 
        var WatchListGateway = M.require( 'mobile.watchlist/WatchListGateway' ),
                response = {
@@ -108,7 +109,7 @@
        QUnit.test( 'load results from the second page from last item of 
first', 6, function ( assert ) {
                var lastTitle = 'Albert Einstein',
                        gateway = new WatchListGateway( new mw.Api(), lastTitle 
),
-                       response1 = $.extend( {}, response, {
+                       response1 = Object.assign( {}, response, {
                                'continue': {
                                        watchlistraw: {
                                                gwrcontinue: '0|Albert Einstein'
@@ -168,4 +169,4 @@
                } );
        } );
 
-}( jQuery, mw.mobileFrontend ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.watchstar/test_Watchstar.js 
b/tests/qunit/mobile.watchstar/test_Watchstar.js
index 41195227..823c583 100644
--- a/tests/qunit/mobile.watchstar/test_Watchstar.js
+++ b/tests/qunit/mobile.watchstar/test_Watchstar.js
@@ -1,4 +1,5 @@
-( function ( $, M ) {
+/* global $ */
+( function ( M ) {
 
        var Watchstar = M.require( 'mobile.watchstar/Watchstar' ),
                CtaDrawer = M.require( 'mobile.startup/CtaDrawer' ),
@@ -92,4 +93,4 @@
                assert.ok( this.toastSpy.calledOnce, 'A toast is shown' );
        } );
 
-}( jQuery, mw.mobileFrontend ) );
+}( mw.mobileFrontend ) );
diff --git a/tests/qunit/mobile.watchstar/test_WatchstarGateway.js 
b/tests/qunit/mobile.watchstar/test_WatchstarGateway.js
index 8ca43a8..a5ef4ac 100644
--- a/tests/qunit/mobile.watchstar/test_WatchstarGateway.js
+++ b/tests/qunit/mobile.watchstar/test_WatchstarGateway.js
@@ -1,4 +1,4 @@
-( function ( $, M ) {
+( function ( M ) {
 
        var WatchstarGateway = M.require( 'mobile.watchstar/WatchstarGateway' ),
                Page = M.require( 'mobile.startup/Page' );
@@ -36,4 +36,4 @@
                        'unloaded pages are marked as undefined' );
        } );
 
-}( jQuery, mw.mobileFrontend ) );
+}( mw.mobileFrontend ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/373139
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia3a6a5d13df1a3f96121c6a755ac7822d77afcf6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <jrob...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to