Merge "Selenium: replace UserLoginPage with BlankPage where possible"
[lhc/web/wiklou.git] / resources / src / mediawiki.widgets / MediaSearch / mw.widgets.MediaSearchWidget.js
index 1cc168a..2e78ba7 100644 (file)
@@ -4,7 +4,7 @@
  * @copyright 2011-2016 VisualEditor Team and others; see AUTHORS.txt
  * @license The MIT License (MIT); see LICENSE.txt
  */
-( function ( $, mw ) {
+( function () {
 
        /**
         * Creates an mw.widgets.MediaSearchWidget object.
                var queryValue = this.query.getValue().trim();
 
                if ( queryValue.match( this.externalLinkUrlProtocolsRegExp ) ) {
-                       queryValue = queryValue.match( /.+\/([^\/]+)/ )[ 1 ];
+                       queryValue = queryValue.match( /.+\/([^/]+)/ )[ 1 ];
                }
                return queryValue;
        };
        mw.widgets.MediaSearchWidget.prototype.runLayoutQueue = function () {
                var i, len;
 
+               // eslint-disable-next-line no-jquery/no-sizzle
                if ( this.$element.is( ':visible' ) ) {
                        for ( i = 0, len = this.layoutQueue.length; i < len; i++ ) {
                                this.layoutQueue.pop()();
        mw.widgets.MediaSearchWidget.prototype.getLang = function () {
                return this.lang;
        };
-}( jQuery, mediaWiki ) );
+}() );