Remove unnecessary Function.binds
authorEd Sanders <esanders@wikimedia.org>
Mon, 1 May 2017 14:02:21 +0000 (15:02 +0100)
committerEd Sanders <esanders@wikimedia.org>
Mon, 1 May 2017 14:02:21 +0000 (15:02 +0100)
Also fix ,->; typo

Change-Id: Icf87ae6e2aa111f3cb578c7355c92ffc6019df55

resources/src/mediawiki.special/mediawiki.special.search.commonsInterwikiWidget.js
resources/src/mediawiki.widgets.datetime/ProlepticGregorianDateTimeFormatter.js
resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js

index 2a93e58..7e42886 100644 (file)
@@ -10,7 +10,7 @@
                var resultOutput = '', i, result, imageCaption, imageThumbnailSrc;
 
                for ( i = 0; i < results.length; i++ ) {
-                       result = results[ i ],
+                       result = results[ i ];
                        imageCaption = mw.html.element( 'span', { 'class': 'iw-result__mini-gallery__caption' }, result.title );
                        imageThumbnailSrc = ( result.thumbnail ) ? result.thumbnail.source : '';
                        resultOutput += '<div class="iw-result__mini-gallery">' +
index 877edba..0346cc1 100644 (file)
                        config.shortMonthNames = {};
                        $.each( config.fullMonthNames, function ( k, v ) {
                                config.shortMonthNames[ k ] = v.substr( 0, 3 );
-                       }.bind( this ) );
+                       } );
                }
                if ( config.shortDayNames && !config.dayLetters ) {
                        config.dayLetters = [];
                        $.each( config.shortDayNames, function ( k, v ) {
                                config.dayLetters[ k ] = v.substr( 0, 1 );
-                       }.bind( this ) );
+                       } );
                }
                if ( config.fullDayNames && !config.dayLetters ) {
                        config.dayLetters = [];
                        $.each( config.fullDayNames, function ( k, v ) {
                                config.dayLetters[ k ] = v.substr( 0, 1 );
-                       }.bind( this ) );
+                       } );
                }
                if ( config.fullDayNames && !config.shortDayNames ) {
                        config.shortDayNames = {};
                        $.each( config.fullDayNames, function ( k, v ) {
                                config.shortDayNames[ k ] = v.substr( 0, 3 );
-                       }.bind( this ) );
+                       } );
                }
                config = $.extend( {
                        fullMonthNames: this.constructor.static.fullMonthNames,
index 57a3d9c..c5a2dd4 100644 (file)
                        }
                        setTimeout( function () {
                                $bodyWrapper.addClass( 'mw-widget-calendarWidget-body-wrapper-fade-' + fade );
-                       }.bind( this ), 0 );
+                       } );
                } else {
                        this.$oldBody.replaceWith( this.$body );
                }