jenkins-bot has submitted this change and it was merged.

Change subject: Replace package grunt-jscs-checker with grunt-jscs, Update 
packages, Add jsonlint test
......................................................................


Replace package grunt-jscs-checker with grunt-jscs, Update packages, Add 
jsonlint test

Add grunt-jscs version 2.6.0

Add grunt-jsonlint version 1.0.7

Update grunt-banana-checker to 0.4.0

Change-Id: Ic41c351c880d1f6186448777379ebeaabfbb05c8
---
M .jscsrc
M Gruntfile.js
M adyen_gateway/forms/js/adyen.js
M gateway_forms/rapidhtml/js/basicForm.js
M globalcollect_gateway/forms/js/gc.cc.js
M globalcollect_gateway/forms/js/gc.ew.js
M globalcollect_gateway/forms/js/gc.js
M globalcollect_gateway/forms/js/webitects.bt.js
M globalcollect_gateway/forms/js/webitects.js
M globalcollect_gateway/forms/js/webitects2nd-US.js
M globalcollect_gateway/forms/js/webitects2nd.js
M globalcollect_gateway/forms/js/webitects_2_3step.js
M modules/iframe.liberator.js
M modules/js/skinOverride.js
M modules/validate_input.js
M package.json
M paypal_gateway/forms/js/paypal.js
M worldpay_gateway/forms/js/esop.js
M worldpay_gateway/forms/js/worldpay.js
19 files changed, 186 insertions(+), 189 deletions(-)

Approvals:
  Awight: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.jscsrc b/.jscsrc
index bb3b0df..afe6d9a 100644
--- a/.jscsrc
+++ b/.jscsrc
@@ -2,5 +2,6 @@
        "preset": "wikimedia",
 
        "requireCamelCaseOrUpperCaseIdentifiers": null,
-       "requireDotNotation": null
+       "requireDotNotation": null,
+       "requireVarDeclFirst": null
 }
diff --git a/Gruntfile.js b/Gruntfile.js
index f9c7482..24cd4bf 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -10,7 +10,7 @@
        grunt.loadNpmTasks( 'grunt-contrib-watch' );
        grunt.loadNpmTasks( 'grunt-jsonlint' );
        grunt.loadNpmTasks( 'grunt-banana-checker' );
-       grunt.loadNpmTasks( 'grunt-jscs-checker' );
+       grunt.loadNpmTasks( 'grunt-jscs' );
 
        grunt.initConfig( {
                pkg: grunt.file.readJSON( 'package.json' ),
@@ -19,6 +19,7 @@
                                jshintrc: true
                        },
                        shared: [
+                               '*.js',
                                'modules/*.js',
                                'modules/js/*.js',
                                'gateway_forms/rapidhtml/**/*.js'
diff --git a/adyen_gateway/forms/js/adyen.js b/adyen_gateway/forms/js/adyen.js
index 2e3a2b6..7710ba3 100644
--- a/adyen_gateway/forms/js/adyen.js
+++ b/adyen_gateway/forms/js/adyen.js
@@ -7,10 +7,10 @@
                $pForm,
                currency_code = 'USD',
                language = 'en', // default value is English
-               matches = document.location.href.match(/uselang=(\w+)/i); // 
fine the real language
+               matches = document.location.href.match( /uselang=(\w+)/i ); // 
fine the real language
 
-       if ( matches && matches[1] ) {
-               language = matches[1];
+       if ( matches && matches[ 1 ] ) {
+               language = matches[ 1 ];
        }
 
        sendData = {
@@ -40,13 +40,13 @@
        };
 
        $.ajax( {
-               url: mw.util.wikiScript( 'api' ),
+               url: mediaWiki.util.wikiScript( 'api' ),
                data: sendData,
                dataType: 'json',
                type: 'GET',
                success: function ( data ) {
                        if ( typeof data.error !== 'undefined' ) {
-                               alert( mw.msg( 
'donate_interface-error-msg-general' ) );
+                               alert( mediaWiki.msg( 
'donate_interface-error-msg-general' ) );
                                $( '#paymentContinue' ).show(); // Show 
continue button in 2nd section
                        } else if ( typeof data.result !== 'undefined' ) {
                                if ( data.result.errors ) {
@@ -86,10 +86,10 @@
                        }
                },
                error: function ( xhr ) {
-                       alert( mw.msg( 'donate_interface-error-msg-general' ) );
+                       alert( mediaWiki.msg( 
'donate_interface-error-msg-general' ) );
                },
                complete: function () {
-                       $('#overlay').hide();
+                       $( '#overlay' ).hide();
                }
        } );
 };
diff --git a/gateway_forms/rapidhtml/js/basicForm.js 
b/gateway_forms/rapidhtml/js/basicForm.js
index a4158f1..d621bcb 100644
--- a/gateway_forms/rapidhtml/js/basicForm.js
+++ b/gateway_forms/rapidhtml/js/basicForm.js
@@ -10,24 +10,24 @@
        // generate formatted errors to display
        temp = [];
        for ( e in amountErrors ) {
-               if ( amountErrors[e] !== '' ) {
-                       temp[temp.length] = amountErrors[e];
+               if ( amountErrors[ e ] !== '' ) {
+                       temp[ temp.length ] = amountErrors[ e ];
                }
        }
        amountErrorString = temp.join( '<br />' );
 
        temp = [];
        for ( f in billingErrors ) {
-               if ( billingErrors[f] !== '' ) {
-                       temp[temp.length] = billingErrors[f];
+               if ( billingErrors[ f ] !== '' ) {
+                       temp[ temp.length ] = billingErrors[ f ];
                }
        }
        billingErrorString = temp.join( '<br />' );
 
        temp = [];
        for ( g in paymentErrors ) {
-               if ( paymentErrors[g] !== '' ) {
-                       temp[temp.length] = paymentErrors[g];
+               if ( paymentErrors[ g ] !== '' ) {
+                       temp[ temp.length ] = paymentErrors[ g ];
                }
        }
        paymentErrorString = temp.join( '<br />' );
diff --git a/globalcollect_gateway/forms/js/gc.cc.js 
b/globalcollect_gateway/forms/js/gc.cc.js
index 795e16e..5aae666 100644
--- a/globalcollect_gateway/forms/js/gc.cc.js
+++ b/globalcollect_gateway/forms/js/gc.cc.js
@@ -14,24 +14,24 @@
        // generate formatted errors to display
        temp = [];
        for ( e in amountErrors ) {
-               if ( amountErrors[e] !== '' ) {
-                       temp[temp.length] = amountErrors[e];
+               if ( amountErrors[ e ] !== '' ) {
+                       temp[ temp.length ] = amountErrors[ e ];
                }
        }
        amountErrorString = temp.join( '<br />' );
 
        temp = [];
        for ( f in billingErrors ) {
-               if ( billingErrors[f] !== '' ) {
-                       temp[temp.length] = billingErrors[f];
+               if ( billingErrors[ f ] !== '' ) {
+                       temp[ temp.length ] = billingErrors[ f ];
                }
        }
        billingErrorString = temp.join( '<br />' );
 
        temp = [];
        for ( g in paymentErrors ) {
-               if ( paymentErrors[g] !== '' ) {
-                       temp[temp.length] = paymentErrors[g];
+               if ( paymentErrors[ g ] !== '' ) {
+                       temp[ temp.length ] = paymentErrors[ g ];
                }
        }
        paymentErrorString = temp.join( '<br />' );
@@ -55,7 +55,7 @@
        } );
 
        // Set the cards to progress to step 3
-       $( '.cardradio' ).on( 'change', function (event) {
+       $( '.cardradio' ).on( 'change', function ( event ) {
 
                if ( validate_personal( document.payment ) && validateAmount() 
) {
                        $( '#payment' ).animate( { height: '314px' }, 1000 );
@@ -70,11 +70,11 @@
                }
        } );
 
-       $( '#cards li' ).click( function (event) {
+       $( '#cards li' ).click( function ( event ) {
                $( this ).find( 'input' ).click();
        } );
 
-       $( '#cards li input' ).click( function (event) {
+       $( '#cards li input' ).click( function ( event ) {
                event.stopPropagation();
        } );
 
@@ -85,7 +85,7 @@
        $( '.cardradio' ).attr( 'checked', false );
 } );
 
-mediaWiki.toggleCreditCardRadios = function (enabled) {
+mediaWiki.toggleCreditCardRadios = function ( enabled ) {
        $( '.cardradio, #paymentContinueBtn' ).prop( 'disabled', !enabled );
 
        if ( enabled ) {
diff --git a/globalcollect_gateway/forms/js/gc.ew.js 
b/globalcollect_gateway/forms/js/gc.ew.js
index 45f906e..9e7439b 100644
--- a/globalcollect_gateway/forms/js/gc.ew.js
+++ b/globalcollect_gateway/forms/js/gc.ew.js
@@ -10,24 +10,24 @@
        // generate formatted errors to display
        temp = [];
        for ( e in amountErrors ) {
-               if ( amountErrors[e] !== '' ) {
-                       temp[temp.length] = amountErrors[e];
+               if ( amountErrors[ e ] !== '' ) {
+                       temp[ temp.length ] = amountErrors[ e ];
                }
        }
        amountErrorString = temp.join( '<br />' );
 
        temp = [];
        for ( f in billingErrors ) {
-               if ( billingErrors[f] !== '' ) {
-                       temp[temp.length] = billingErrors[f];
+               if ( billingErrors[ f ] !== '' ) {
+                       temp[ temp.length ] = billingErrors[ f ];
                }
        }
        billingErrorString = temp.join( '<br />' );
 
        temp = [];
        for ( g in paymentErrors ) {
-               if ( paymentErrors[g] !== '' ) {
-                       temp[temp.length] = paymentErrors[g];
+               if ( paymentErrors[ g ] !== '' ) {
+                       temp[ temp.length ] = paymentErrors[ g ];
                }
        }
        paymentErrorString = temp.join( '<br />' );
@@ -42,7 +42,7 @@
        }
 
        $( '#bt-continueBtn' ).on( 'click', function () {
-               if ( validateAmount() ) { //&& validate_personal( 
document.paypalcontribution ) ) {
+               if ( validateAmount() ) { // && validate_personal( 
document.paypalcontribution ) ) {
                        document.paypalcontribution.action = actionURL;
                        document.paypalcontribution.submit();
                }
diff --git a/globalcollect_gateway/forms/js/gc.js 
b/globalcollect_gateway/forms/js/gc.js
index 08d0c1c..e8b562f 100644
--- a/globalcollect_gateway/forms/js/gc.js
+++ b/globalcollect_gateway/forms/js/gc.js
@@ -59,20 +59,20 @@
        };
 
        // If the field, street_supplemental, exists add it to sendData
-       if ( $('input[name="street_supplemental"]').length ) {
+       if ( $( 'input[name="street_supplemental"]' ).length ) {
                sendData.street_supplemental = $( 
'input[name="street_supplemental"]' ).val();
        }
 
        mediaWiki.toggleCreditCardRadios( false );
 
        $.ajax( {
-               url: mw.util.wikiScript( 'api' ),
+               url: mediaWiki.util.wikiScript( 'api' ),
                data: sendData,
                dataType: 'json',
                type: 'GET',
                success: function ( data ) {
                        if ( !data || data.error !== undefined ) {
-                               alert( mw.msg( 
'donate_interface-error-msg-general' ) );
+                               alert( mediaWiki.msg( 
'donate_interface-error-msg-general' ) );
                                $( '#payment' ).empty(); // Hide spinner
                                $( '#paymentContinue' ).show(); // Show 
continue button in 2nd section
                        } else if ( data.result !== undefined ) {
@@ -83,13 +83,13 @@
                                                $( '#paymentContinue' ).show(); 
// Show continue button in 2nd section
                                        } );
                                } else if ( data.result.formaction || 
data.result.testform ) {
-                                       mw.generatePaymentForm( data );
+                                       mediaWiki.generatePaymentForm( data );
                                }
                        }
                },
                error: function ( xhr ) {
                        $( '#payment' ).empty(); // Hide spinner
-                       alert( mw.msg( 'donate_interface-error-msg-general' ) );
+                       alert( mediaWiki.msg( 
'donate_interface-error-msg-general' ) );
                },
                complete: function ( xhr ) {
                        // Make sure our radio buttons are reenabled at some 
point.
diff --git a/globalcollect_gateway/forms/js/webitects.bt.js 
b/globalcollect_gateway/forms/js/webitects.bt.js
index 866ff0c..612a25c 100644
--- a/globalcollect_gateway/forms/js/webitects.bt.js
+++ b/globalcollect_gateway/forms/js/webitects.bt.js
@@ -18,24 +18,24 @@
        // generate formatted errors to display
        temp = [];
        for ( e in amountErrors ) {
-               if ( amountErrors[e] !== '' ) {
-                       temp[temp.length] = amountErrors[e];
+               if ( amountErrors[ e ] !== '' ) {
+                       temp[ temp.length ] = amountErrors[ e ];
                }
        }
        amountErrorString = temp.join( '<br />' );
 
        temp = [];
        for ( f in billingErrors ) {
-               if ( billingErrors[f] !== '' ) {
-                       temp[temp.length] = billingErrors[f];
+               if ( billingErrors[ f ] !== '' ) {
+                       temp[ temp.length ] = billingErrors[ f ];
                }
        }
        billingErrorString = temp.join( '<br />' );
 
        temp = [];
        for ( g in paymentErrors ) {
-               if ( paymentErrors[g] !== '' ) {
-                       temp[temp.length] = paymentErrors[g];
+               if ( paymentErrors[ g ] !== '' ) {
+                       temp[ temp.length ] = paymentErrors[ g ];
                }
        }
        paymentErrorString = temp.join( '<br />' );
@@ -65,7 +65,7 @@
        if ( amount === null || isNaN( amount.val() ) || amount.val() <= 0 ) {
                // the amount is not set
                $( '#step1wrapper' ).slideDown();
-//             showAmount( document.getElementByName( 'amount' ) );
+               // showAmount( document.getElementByName( 'amount' ) );
        } else {
                showAmount( $( 'input[name="amount"]' ) );
        }
diff --git a/globalcollect_gateway/forms/js/webitects.js 
b/globalcollect_gateway/forms/js/webitects.js
index 76079c0..22442ba 100644
--- a/globalcollect_gateway/forms/js/webitects.js
+++ b/globalcollect_gateway/forms/js/webitects.js
@@ -2,16 +2,16 @@
 window.displayCreditCardForm = function () {
        $( '#payment' ).empty();
        // Load wait spinner
-       $( '#payment' ).append( '<br/><br/><img alt="loading" src="' + 
mw.config.get( 'wgScriptPath' ) +
+       $( '#payment' ).append( '<br/><br/><img alt="loading" src="' + 
mediaWiki.config.get( 'wgScriptPath' ) +
                
'/extensions/DonationInterface/gateway_forms/includes/loading-white.gif" />' );
 
        window.showStep3(); // Open the 3rd section
        var currencyField, currency_code, stateField, state, countryField, 
country, sendData,
                language = 'en', // default value is English
-               matches = document.location.href.match(/uselang=(\w+)/i); // 
fine the real language
+               matches = document.location.href.match( /uselang=(\w+)/i ); // 
fine the real language
 
-       if ( matches && matches[1] ) {
-               language = matches[1];
+       if ( matches && matches[ 1 ] ) {
+               language = matches[ 1 ];
        }
 
        currencyField = document.getElementById( 'input_currency_code' );
@@ -63,13 +63,13 @@
                format: 'json'
        };
        $.ajax( {
-               url: mw.util.wikiScript( 'api' ),
+               url: mediaWiki.util.wikiScript( 'api' ),
                data: sendData,
                dataType: 'json',
                type: 'GET',
                success: function ( data ) {
                        if ( typeof data.error !== 'undefined' ) {
-                               alert( mw.msg( 
'donate_interface-error-msg-general' ) );
+                               alert( mediaWiki.msg( 
'donate_interface-error-msg-general' ) );
                                $( '#paymentContinue' ).show(); // Show 
continue button in 2nd section
                                window.showStep2();
                        } else if ( typeof data.result !== 'undefined' ) {
@@ -93,7 +93,7 @@
                        }
                },
                error: function ( xhr ) {
-                       alert( mw.msg( 'donate_interface-error-msg-general' ) );
+                       alert( mediaWiki.msg( 
'donate_interface-error-msg-general' ) );
                        window.showStep1();
                }
        } );
@@ -112,6 +112,6 @@
        if ( $( 'select[name="currency_code"]' ).length ) {
                currency_code = $( 'select[name="currency_code"]' ).val();
        }
-       $('#selected-amount').text(+e.val() + ' ' + currency_code);
+       $( '#selected-amount' ).text( +e.val() + ' ' + currency_code );
        $( '#change-amount' ).show();
 };
diff --git a/globalcollect_gateway/forms/js/webitects2nd-US.js 
b/globalcollect_gateway/forms/js/webitects2nd-US.js
index 2b46f67..dd77517 100644
--- a/globalcollect_gateway/forms/js/webitects2nd-US.js
+++ b/globalcollect_gateway/forms/js/webitects2nd-US.js
@@ -14,24 +14,24 @@
        // generate formatted errors to display
        temp = [];
        for ( e in amountErrors ) {
-               if ( amountErrors[e] !== '' ) {
-                       temp[temp.length] = amountErrors[e];
+               if ( amountErrors[ e ] !== '' ) {
+                       temp[ temp.length ] = amountErrors[ e ];
                }
        }
        amountErrorString = temp.join( '<br />' );
 
        temp = [];
        for ( f in billingErrors ) {
-               if ( billingErrors[f] !== '' ) {
-                       temp[temp.length] = billingErrors[f];
+               if ( billingErrors[ f ] !== '' ) {
+                       temp[ temp.length ] = billingErrors[ f ];
                }
        }
        billingErrorString = temp.join( '<br />' );
 
        temp = [];
        for ( g in paymentErrors ) {
-               if ( paymentErrors[g] !== '' ) {
-                       temp[temp.length] = paymentErrors[g];
+               if ( paymentErrors[ g ] !== '' ) {
+                       temp[ temp.length ] = paymentErrors[ g ];
                }
        }
        paymentErrorString = temp.join( '<br />' );
@@ -81,7 +81,7 @@
        if ( amount === null || isNaN( amount.val() ) || amount.val() <= 0 ) {
                // the amount is not set
                $( '#step1wrapper' ).slideDown();
-//             $( '#selected-amount' ).text( '(' + $( 
'input[name="currency_code"]' ).val() + ')' );
+               // $( '#selected-amount' ).text( '( ' + $( 
'input[name="currency_code"]' ).val() + ' )' );
 
        } else {
                showAmount( $( 'input[name="amount"]' ) );
@@ -162,7 +162,7 @@
 };
 
 window.showStep2 = function () {
-       if ( $( '#step3wrapper' ).is(':visible') ) {
+       if ( $( '#step3wrapper' ).is( ':visible' ) ) {
                $( '#paymentContinue' ).show(); // Show continue button in 2nd 
section
        }
        // show the correct sections
diff --git a/globalcollect_gateway/forms/js/webitects2nd.js 
b/globalcollect_gateway/forms/js/webitects2nd.js
index 318344f..fa1ef82 100644
--- a/globalcollect_gateway/forms/js/webitects2nd.js
+++ b/globalcollect_gateway/forms/js/webitects2nd.js
@@ -14,24 +14,24 @@
        // generate formatted errors to display
        temp = [];
        for ( e in amountErrors ) {
-               if ( amountErrors[e] !== '' ) {
-                       temp[temp.length] = amountErrors[e];
+               if ( amountErrors[ e ] !== '' ) {
+                       temp[ temp.length ] = amountErrors[ e ];
                }
        }
        amountErrorString = temp.join( '<br />' );
 
        temp = [];
        for ( f in billingErrors ) {
-               if ( billingErrors[f] !== '' ) {
-                       temp[temp.length] = billingErrors[f];
+               if ( billingErrors[ f ] !== '' ) {
+                       temp[ temp.length ] = billingErrors[ f ];
                }
        }
        billingErrorString = temp.join( '<br />' );
 
        temp = [];
        for ( g in paymentErrors ) {
-               if ( paymentErrors[g] !== '' ) {
-                       temp[temp.length] = paymentErrors[g];
+               if ( paymentErrors[ g ] !== '' ) {
+                       temp[ temp.length ] = paymentErrors[ g ];
                }
        }
        paymentErrorString = temp.join( '<br />' );
@@ -164,7 +164,7 @@
        if ( $( 'select[name="currency_code"]' ).length ) {
                currency_code = $( 'select[name="currency_code"]' ).val();
        }
-       $('#selected-amount').text(+e.val() + ' ' + currency_code);
+       $( '#selected-amount' ).text( +e.val() + ' ' + currency_code );
        $( '#change-amount' ).show();
 };
 
@@ -180,7 +180,7 @@
 };
 
 window.showStep2 = function () {
-       if ( $( '#step3wrapper' ).is(':visible') ) {
+       if ( $( '#step3wrapper' ).is( ':visible' ) ) {
                $( '#paymentContinue' ).show(); // Show continue button in 2nd 
section
        }
        // show the correct sections
diff --git a/globalcollect_gateway/forms/js/webitects_2_3step.js 
b/globalcollect_gateway/forms/js/webitects_2_3step.js
index a287151..dd5fd4a 100644
--- a/globalcollect_gateway/forms/js/webitects_2_3step.js
+++ b/globalcollect_gateway/forms/js/webitects_2_3step.js
@@ -10,24 +10,24 @@
        // generate formatted errors to display
        temp = [];
        for ( e in amountErrors ) {
-               if ( amountErrors[e] !== '' ) {
-                       temp[temp.length] = amountErrors[e];
+               if ( amountErrors[ e ] !== '' ) {
+                       temp[ temp.length ] = amountErrors[ e ];
                }
        }
        amountErrorString = temp.join( '<br />' );
 
        temp = [];
        for ( f in billingErrors ) {
-               if ( billingErrors[f] !== '' ) {
-                       temp[temp.length] = billingErrors[f];
+               if ( billingErrors[ f ] !== '' ) {
+                       temp[ temp.length ] = billingErrors[ f ];
                }
        }
        billingErrorString = temp.join( '<br />' );
 
        temp = [];
        for ( g in paymentErrors ) {
-               if ( paymentErrors[g] !== '' ) {
-                       temp[temp.length] = paymentErrors[g];
+               if ( paymentErrors[ g ] !== '' ) {
+                       temp[ temp.length ] = paymentErrors[ g ];
                }
        }
        paymentErrorString = temp.join( '<br />' );
@@ -100,7 +100,7 @@
                        $( 'input[name="gateway"]' ).val( 'paypal' );
                        $( 'input[name="PaypalRedirect"]' ).val( '1' );
                        $( '#loading' ).html( '<img alt="loading" src="' +
-                               mw.config.get( 'wgScriptPath') +
+                               mediaWiki.config.get( 'wgScriptPath' ) +
                                
'/extensions/DonationInterface/gateway_forms/includes/loading-white.gif"' +
                                ' /> Redirecting to PayPal…' );
                        document.paypalcontribution.action = actionURL;
@@ -198,7 +198,7 @@
 };
 
 window.showStep2 = function () {
-       if ( $( '#step3wrapper' ).is(':visible') ) {
+       if ( $( '#step3wrapper' ).is( ':visible' ) ) {
                $( '#paymentContinue' ).show(); // Show continue button in 2nd 
section
        }
        // show the correct sections
diff --git a/modules/iframe.liberator.js b/modules/iframe.liberator.js
index 55f684b..5d55eec 100644
--- a/modules/iframe.liberator.js
+++ b/modules/iframe.liberator.js
@@ -1,8 +1,8 @@
 /*global self:false */
 if ( top.frames.length !== 0 ) {
        jQuery( document ).ready( function () {
-               //we're going to immediately redirect.
-               //Hide the page contents (skin, mostly) so it doesn't appear in 
the iframe while we're waiting for the reload.
+               // we're going to immediately redirect.
+               // Hide the page contents (skin, mostly) so it doesn't appear 
in the iframe while we're waiting for the reload.
                jQuery( 'body' ).children().attr( 'style', 'display:none' );
        } );
        top.location = self.document.location + '&liberated=1';
diff --git a/modules/js/skinOverride.js b/modules/js/skinOverride.js
index 36ad34e..a5bf430 100644
--- a/modules/js/skinOverride.js
+++ b/modules/js/skinOverride.js
@@ -1,3 +1,3 @@
-jQuery(document).ready(function () {
-       jQuery('div#p-logo a').attr('href', '#');
-});
+jQuery( document ).ready( function () {
+       jQuery( 'div#p-logo a' ).attr( 'href', '#' );
+} );
diff --git a/modules/validate_input.js b/modules/validate_input.js
index 6a8484c..2aedfcd 100644
--- a/modules/validate_input.js
+++ b/modules/validate_input.js
@@ -13,27 +13,27 @@
 };
 
 window.clearField = function ( field, defaultValue ) {
-       if (field.value === defaultValue) {
+       if ( field.value === defaultValue ) {
                field.value = '';
                field.style.color = 'black';
        }
 };
 window.clearField2 = function ( field, defaultValue ) {
-       if (field.value !== defaultValue) {
+       if ( field.value !== defaultValue ) {
                field.value = '';
                field.style.color = 'black';
        }
 };
 
 window.switchToPayPal = function () {
-       document.getElementById('payment-table-cc').style.display = 'none';
-       document.getElementById('payment_gateway-form-submit').style.display = 
'none';
-       
document.getElementById('payment_gateway-form-submit-paypal').style.display = 
'block';
+       document.getElementById( 'payment-table-cc' ).style.display = 'none';
+       document.getElementById( 'payment_gateway-form-submit' ).style.display 
= 'none';
+       document.getElementById( 'payment_gateway-form-submit-paypal' 
).style.display = 'block';
 };
 window.switchToCreditCard = function () {
-       document.getElementById('payment-table-cc').style.display = 'table';
-       document.getElementById('payment_gateway-form-submit').style.display = 
'block';
-       
document.getElementById('payment_gateway-form-submit-paypal').style.display = 
'none';
+       document.getElementById( 'payment-table-cc' ).style.display = 'table';
+       document.getElementById( 'payment_gateway-form-submit' ).style.display 
= 'block';
+       document.getElementById( 'payment_gateway-form-submit-paypal' 
).style.display = 'none';
 };
 
 /**
@@ -64,11 +64,11 @@
        if ( $( 'select[name="currency_code"]' ).length ) {
                currency_code = $( 'select[name="currency_code"]' ).val();
        }
-       if ( ( typeof wgCurrencyMinimums[currency_code] ) === 'undefined' ) {
-               wgCurrencyMinimums[currency_code] = 1;
+       if ( ( typeof wgCurrencyMinimums[ currency_code ] ) === 'undefined' ) {
+               wgCurrencyMinimums[ currency_code ] = 1;
        }
-       if ( amount < wgCurrencyMinimums[currency_code] || error ) {
-               alert( mw.msg( 'donate_interface-smallamount-error' ).replace( 
'$1', wgCurrencyMinimums[currency_code] + ' ' + currency_code ) );
+       if ( amount < wgCurrencyMinimums[ currency_code ] || error ) {
+               alert( mediaWiki.msg( 'donate_interface-smallamount-error' 
).replace( '$1', wgCurrencyMinimums[ currency_code ] + ' ' + currency_code ) );
                error = true;
                // See if we're on a webitects accordian form
                if ( $( '#step1wrapper' ).length ) {
@@ -89,11 +89,9 @@
 /**
  * Validates the personal information fields
  *
- * @input form The form containing the inputs to be checked
- *
- * @return boolean true if no errors, false otherwise (also uses in-page error 
messages to notify the user)
+ * @return {boolean} true if no errors, false otherwise (also uses in-page 
error messages to notify the user)
  */
-window.validate_personal = function ( form ) {
+window.validate_personal = function () {
        var value, stateField, selectedState, countryField, $emailAdd, invalid, 
apos, dotpos, domain,
                errorsPresent = false,
                currField = '',
@@ -104,38 +102,38 @@
                invalids = [ '..', '/', '\\', ',', '<', '>' ];
 
        for ( i = 0; i < numFields; i++ ) {
-               if ( $( '#' + fields[i] ).length > 0 ) { // Make sure field 
exists
-                       $( '#' + msgFields[i] ).removeClass( 'errorMsg' );
-                       $( '#' + msgFields[i] ).addClass( 'errorMsgHide' );
-                       $( '#' + fields[i] ).removeClass( 'errorHighlight' );
+               if ( $( '#' + fields[ i ] ).length > 0 ) { // Make sure field 
exists
+                       $( '#' + msgFields[ i ] ).removeClass( 'errorMsg' );
+                       $( '#' + msgFields[ i ] ).addClass( 'errorMsgHide' );
+                       $( '#' + fields[ i ] ).removeClass( 'errorHighlight' );
                        // See if the field is empty or equal to the placeholder
-                       value = document.getElementById( fields[i] ).value;
+                       value = document.getElementById( fields[ i ] ).value;
                        if (
-                               !$( '#' + fields[i] ).hasClass( 'optional' ) &&
+                               !$( '#' + fields[ i ] ).hasClass( 'optional' ) 
&&
                                (
                                        !$.trim( value ) ||
-                                       value === mw.msg( 
'donate_interface-donor-' + fields[i] )
+                                       value === mediaWiki.msg( 
'donate_interface-donor-' + fields[ i ] )
                                )
                        ) {
-                               currField = mw.msg( 
'donate_interface-error-msg-' + fields[i] );
+                               currField = mediaWiki.msg( 
'donate_interface-error-msg-' + fields[ i ] );
                                errorsPresent = true;
-                               $( '#' + fields[i] ).addClass( 'errorHighlight' 
);
-                               $( '#' + msgFields[i] ).removeClass( 
'errorMsgHide' );
-                               $( '#' + msgFields[i] ).addClass( 'errorMsg' );
-                               $( '#' + msgFields[i] ).text( mw.msg( 
'donate_interface-error-msg' ).replace( '$1', currField ) );
+                               $( '#' + fields[ i ] ).addClass( 
'errorHighlight' );
+                               $( '#' + msgFields[ i ] ).removeClass( 
'errorMsgHide' );
+                               $( '#' + msgFields[ i ] ).addClass( 'errorMsg' 
);
+                               $( '#' + msgFields[ i ] ).text( mediaWiki.msg( 
'donate_interface-error-msg' ).replace( '$1', currField ) );
                        }
                }
        }
 
        stateField = document.getElementById( 'state' );
        if ( stateField && stateField.type === 'select-one' ) { // state is a 
dropdown select
-               selectedState = 
stateField.options[stateField.selectedIndex].value;
+               selectedState = stateField.options[ stateField.selectedIndex 
].value;
                if ( selectedState === 'YY' || !$.trim( selectedState ) ) {
                        errorsPresent = true;
                        $( '#state' ).addClass( 'errorHighlight' );
                        $( '#stateMsg' ).removeClass( 'errorMsgHide' );
                        $( '#stateMsg' ).addClass( 'errorMsg' );
-                       $( '#stateMsg' ).text( mw.msg( 
'donate_interface-error-msg' ).replace( '$1', 
mw.msg('donate_interface-state-province'   ) ) );
+                       $( '#stateMsg' ).text( mediaWiki.msg( 
'donate_interface-error-msg' ).replace( '$1', mediaWiki.msg( 
'donate_interface-state-province' ) ) );
                } else {
                        $( '#state' ).removeClass( 'errorHighlight' );
                        $( '#stateMsg' ).removeClass( 'errorMsg' );
@@ -145,12 +143,12 @@
 
        countryField = document.getElementById( 'country' );
        if ( countryField && countryField.type === 'select-one' ) { // country 
is a dropdown select
-               if ( !$.trim( 
countryField.options[countryField.selectedIndex].value ) ) {
+               if ( !$.trim( countryField.options[ countryField.selectedIndex 
].value ) ) {
                        errorsPresent = true;
                        $( '#country' ).addClass( 'errorHighlight' );
                        $( '#countryMsg' ).removeClass( 'errorMsgHide' );
                        $( '#countryMsg' ).addClass( 'errorMsg' );
-                       $( '#countryMsg' ).text( mw.msg( 
'donate_interface-error-msg-country' ) );
+                       $( '#countryMsg' ).text( mediaWiki.msg( 
'donate_interface-error-msg-country' ) );
                } else {
                        $( '#country' ).removeClass( 'errorHighlight' );
                        $( '#countryMsg' ).removeClass( 'errorMsg' );
@@ -162,7 +160,7 @@
                        $( '#country' ).addClass( 'errorHighlight' );
                        $( '#countryMsg' ).removeClass( 'errorMsgHide' );
                        $( '#countryMsg' ).addClass( 'errorMsg' );
-                       $( '#countryMsg' ).text( mw.msg( 
'donate_interface-error-msg-country' ) );
+                       $( '#countryMsg' ).text( mediaWiki.msg( 
'donate_interface-error-msg-country' ) );
                } else {
                        $( '#country' ).removeClass( 'errorHighlight' );
                        $( '#countryMsg' ).removeClass( 'errorMsg' );
@@ -174,7 +172,7 @@
        $emailAdd = document.getElementById( 'emailAdd' );
        if (
                $.trim( $emailAdd.value ) &&
-               $emailAdd.value !== mw.msg( 'donate_interface-donor-emailAdd' )
+               $emailAdd.value !== mediaWiki.msg( 
'donate_interface-donor-emailAdd' )
        ) {
                invalid = false;
 
@@ -186,19 +184,19 @@
                        $( '#emailAdd' ).addClass( 'errorHighlight' );
                        $( '#emailAddMsg' ).removeClass( 'errorMsgHide' );
                        $( '#emailAddMsg' ).addClass( 'errorMsg' );
-                       $( '#emailAddMsg' ).text( mw.msg( 
'donate_interface-error-msg-email' ) );
+                       $( '#emailAddMsg' ).text( mediaWiki.msg( 
'donate_interface-error-msg-email' ) );
                        invalid = true;
                }
 
                domain = $emailAdd.value.substring( apos + 1 );
 
                for ( i = 0; i < invalids.length && !invalid; i++ ) {
-                       if ( domain.indexOf( invalids[i] ) !== -1 ) {
+                       if ( domain.indexOf( invalids[ i ] ) !== -1 ) {
                                errorsPresent = true;
                                $( '#emailAdd' ).addClass( 'errorHighlight' );
                                $( '#emailAddMsg' ).removeClass( 'errorMsgHide' 
);
                                $( '#emailAddMsg' ).addClass( 'errorMsg' );
-                               $( '#emailAddMsg' ).text( mw.msg( 
'donate_interface-error-msg-email' ) );
+                               $( '#emailAddMsg' ).text( mediaWiki.msg( 
'donate_interface-error-msg-email' ) );
                                invalid = true;
                                break;
                        }
@@ -213,7 +211,7 @@
        } else {
                errorsPresent = true; // display error
                $( '#cookieMsg' ).addClass( 'errorMsg' );
-               $( '#cookieMsg' ).text( mw.msg( 
'donate_interface-error-msg-cookies' ) );
+               $( '#cookieMsg' ).text( mediaWiki.msg( 
'donate_interface-error-msg-cookies' ) );
        }
 
        if ( errorsPresent ) {
@@ -238,51 +236,51 @@
                numFields = fields.length;
 
        for ( i = 0; i < numFields; i++ ) {
-               element = document.getElementById( fields[i] );
+               element = document.getElementById( fields[ i ] );
 
                if ( element ) { // Make sure field exists
                        value = element.value;
                        // See if the field is empty or equal to the placeholder
                        if (
-                               !$( '#' + fields[i] ).hasClass( 'optional' ) &&
+                               !$( '#' + fields[ i ] ).hasClass( 'optional' ) 
&&
                                (
                                        !$.trim( value ) ||
-                                       value === mw.msg( 
'donate_interface-donor-' + fields[i] )
+                                       value === mediaWiki.msg( 
'donate_interface-donor-' + fields[ i ] )
                                )
                        ) {
-                               currField = mw.msg( 
'donate_interface-error-msg-' + fields[i] );
-                               output += mw.msg( 
'donate_interface-error-msg-js' ) + ' ' + currField + '.\r\n';
+                               currField = mediaWiki.msg( 
'donate_interface-error-msg-' + fields[ i ] );
+                               output += mediaWiki.msg( 
'donate_interface-error-msg-js' ) + ' ' + currField + '.\r\n';
                        }
                }
        }
 
        stateField = document.getElementById( 'state' );
        if ( stateField && stateField.type === 'select-one' ) { // state is a 
dropdown select
-               selectedState = 
stateField.options[stateField.selectedIndex].value;
+               selectedState = stateField.options[ stateField.selectedIndex 
].value;
                if ( selectedState === 'YY' || !$.trim( selectedState ) ) {
-                       output += mw.msg( 'donate_interface-error-msg-js' ) + ' 
' + mw.msg( 'donate_interface-state-province' ) + '.\r\n';
+                       output += mediaWiki.msg( 
'donate_interface-error-msg-js' ) + ' ' + mediaWiki.msg( 
'donate_interface-state-province' ) + '.\r\n';
                }
        }
 
        countryField = document.getElementById( 'country' );
        if ( countryField && countryField.type === 'select-one' ) { // country 
is a dropdown select
-               if ( !$.trim( 
countryField.options[countryField.selectedIndex].value ) ) {
-                       output += mw.msg( 'donate_interface-error-msg-js' ) + ' 
' + mw.msg( 'donate_interface-error-msg-country' ) + '.\r\n';
+               if ( !$.trim( countryField.options[ countryField.selectedIndex 
].value ) ) {
+                       output += mediaWiki.msg( 
'donate_interface-error-msg-js' ) + ' ' + mediaWiki.msg( 
'donate_interface-error-msg-country' ) + '.\r\n';
                }
        } else { // country is a hidden or text input
                if ( !$.trim( countryField.value ) ) {
-                       output += mw.msg( 'donate_interface-error-msg-js' ) + ' 
' + mw.msg( 'donate_interface-error-msg-country' ) + '.\r\n';
+                       output += mediaWiki.msg( 
'donate_interface-error-msg-js' ) + ' ' + mediaWiki.msg( 
'donate_interface-error-msg-country' ) + '.\r\n';
                }
        }
 
        // validate email address
        $emailAdd = document.getElementById( 'emailAdd' ) || 
document.getElementById( 'email' );
-       if ( $.trim( $emailAdd.value ) && $emailAdd.value !== mw.msg( 
'donate_interface-donor-emailAdd' ) ) {
-               apos = $emailAdd.value.indexOf('@');
-               dotpos = $emailAdd.value.lastIndexOf('.');
+       if ( $.trim( $emailAdd.value ) && $emailAdd.value !== mediaWiki.msg( 
'donate_interface-donor-emailAdd' ) ) {
+               apos = $emailAdd.value.indexOf( '@' );
+               dotpos = $emailAdd.value.lastIndexOf( '.' );
 
                if ( apos < 1 || dotpos - apos < 2 ) {
-                       output += mw.msg( 'donate_interface-error-msg-email' ) 
+ '.\r\n';
+                       output += mediaWiki.msg( 
'donate_interface-error-msg-email' ) + '.\r\n';
                }
        }
 
@@ -291,7 +289,7 @@
        if ( document.cookie.indexOf( 'wmf_test=1' ) !== -1 ) {
                document.cookie = 'wmf_test=; expires=Thu, 01-Jan-70 00:00:01 
GMT;'; // unset the cookie
        } else {
-               output += mw.msg( 'donate_interface-error-msg-cookies' ); // 
display error
+               output += mediaWiki.msg( 'donate_interface-error-msg-cookies' 
); // display error
        }
 
        if ( output ) {
@@ -312,24 +310,24 @@
        // generate formatted errors to display
        temp = [];
        for ( e in amountErrors ) {
-               if ( amountErrors[e] !== '' ) {
-                       temp[temp.length] = amountErrors[e];
+               if ( amountErrors[ e ] !== '' ) {
+                       temp[ temp.length ] = amountErrors[ e ];
                }
        }
        amountErrorString = temp.join( '<br />' );
 
        temp = [];
        for ( f in billingErrors ) {
-               if ( billingErrors[f] !== '' ) {
-                       temp[temp.length] = billingErrors[f];
+               if ( billingErrors[ f ] !== '' ) {
+                       temp[ temp.length ] = billingErrors[ f ];
                }
        }
        billingErrorString = temp.join( '<br />' );
 
        temp = [];
        for ( g in paymentErrors ) {
-               if ( paymentErrors[g] !== '' ) {
-                       temp[temp.length] = paymentErrors[g];
+               if ( paymentErrors[ g ] !== '' ) {
+                       temp[ temp.length ] = paymentErrors[ g ];
                }
        }
        paymentErrorString = temp.join( '<br />' );
@@ -345,7 +343,7 @@
 };
 
 window.submit_form = function ( ccform ) {
-       if ( window.validate_form( ccform )) {
+       if ( window.validate_form( ccform ) ) {
                // weird hack!!!!!! for some reason doing just ccform.submit() 
throws an error....
                $( ccform ).submit();
        }
@@ -366,7 +364,7 @@
 
        if ( document.getElementById( 'four_cards' ) && 
document.getElementById( 'two_cards' ) ) {
                index = document.getElementById( 'input_currency_code' 
).selectedIndex;
-               if ( document.getElementById( 'input_currency_code' 
).options[index].value === 'USD' ) {
+               if ( document.getElementById( 'input_currency_code' ).options[ 
index ].value === 'USD' ) {
                        document.getElementById( 'four_cards' ).style.display = 
'table-row';
                        document.getElementById( 'two_cards' ).style.display = 
'none';
                } else {
@@ -382,7 +380,7 @@
        window.cvv = window.open(
                        '', 'cvvhelp', 
'scrollbars=yes,resizable=yes,width=600,height=400,left=200,top=100'
                );
-       window.cvv.document.write( mw.msg( 'donate_interface-cvv-explain' ) );
+       window.cvv.document.write( mediaWiki.msg( 
'donate_interface-cvv-explain' ) );
        window.cvv.focus();
 };
 
diff --git a/package.json b/package.json
index 65b2e80..3a952c4 100644
--- a/package.json
+++ b/package.json
@@ -15,7 +15,7 @@
     "grunt-contrib-jshint": "0.11.3",
     "grunt-contrib-watch": "0.6.1",
     "grunt-banana-checker": "0.4.0",
-    "grunt-jscs-checker": "0.8.1",
+    "grunt-jscs": "2.6.0",
     "grunt-jsonlint": "1.0.7"
   }
 }
diff --git a/paypal_gateway/forms/js/paypal.js 
b/paypal_gateway/forms/js/paypal.js
index 4b05f62..e7fdadf 100644
--- a/paypal_gateway/forms/js/paypal.js
+++ b/paypal_gateway/forms/js/paypal.js
@@ -9,24 +9,24 @@
        // generate formatted errors to display
        temp = [];
        for ( e in amountErrors ) {
-               if ( amountErrors[e] !== '' ) {
-                       temp[temp.length] = amountErrors[e];
+               if ( amountErrors[ e ] !== '' ) {
+                       temp[ temp.length ] = amountErrors[ e ];
                }
        }
        amountErrorString = temp.join( '<br />' );
 
        temp = [];
        for ( f in billingErrors ) {
-               if ( billingErrors[f] !== '' ) {
-                       temp[temp.length] = billingErrors[f];
+               if ( billingErrors[ f ] !== '' ) {
+                       temp[ temp.length ] = billingErrors[ f ];
                }
        }
        billingErrorString = temp.join( '<br />' );
 
        temp = [];
        for ( g in paymentErrors ) {
-               if ( paymentErrors[g] !== '' ) {
-                       temp[temp.length] = paymentErrors[g];
+               if ( paymentErrors[ g ] !== '' ) {
+                       temp[ temp.length ] = paymentErrors[ g ];
                }
        }
        paymentErrorString = temp.join( '<br />' );
diff --git a/worldpay_gateway/forms/js/esop.js 
b/worldpay_gateway/forms/js/esop.js
index 07b51ba..f647aa2 100644
--- a/worldpay_gateway/forms/js/esop.js
+++ b/worldpay_gateway/forms/js/esop.js
@@ -1,5 +1,5 @@
 $( document ).ready( function () {
-       var form = $( '#payment-form' )[0];
+       var form = $( '#payment-form' )[ 0 ];
 
        if ( $( 'input[name="payment_submethod"]:checked' ).length > 0 ) {
                $( '#paymentContinue' ).show();
@@ -12,7 +12,7 @@
                if ( window.validate_form( form ) ) {
                        submitForm();
                }
-       });
+       } );
 
        // Submit on submethod selection if valid, otherwise show continute 
button.
        $( 'input[name="payment_submethod"]' ).on( 'change', function () {
@@ -39,8 +39,8 @@
                        payment_submethod: $( 
'input[name=payment_submethod]:checked' ).val()
                };
 
-               $.ajax({
-                       url: mw.util.wikiScript( 'api' ),
+               $.ajax( {
+                       url: mediaWiki.util.wikiScript( 'api' ),
                        data: postdata,
                        dataType: 'json',
                        type: 'POST',
@@ -57,7 +57,7 @@
                                                        refresh = true;
                                                }
                                                errors.push( str );
-                                       });
+                                       } );
                                        window.alert( errors.join( '\n' ) );
                                        if ( refresh ) {
                                                window.location.reload();
@@ -72,23 +72,23 @@
                                        );
                                        $( '#payment-iframe' ).show( 'blind' );
                                        setTimeout( function () {
-                                               window.alert( mw.msg( 
'donate_interface-cc-token-expired' ) );
+                                               window.alert( mediaWiki.msg( 
'donate_interface-cc-token-expired' ) );
                                                window.location.reload( true );
-                                       }, mw.config.get( 
'wgWorldpayGatewayTokenTimeout' ) );
+                                       }, mediaWiki.config.get( 
'wgWorldpayGatewayTokenTimeout' ) );
                                } else {
-                                       window.alert( mw.msg( 
'donate_interface-error-msg-general' ) );
+                                       window.alert( mediaWiki.msg( 
'donate_interface-error-msg-general' ) );
                                        $( '#paymentContinue' ).show();
                                        $( '#paymentContinueBtn' ).addClass( 
'enabled' );
                                }
                        },
                        error: function ( xhr ) {
-                               window.alert( mw.msg( 
'donate_interface-error-msg-general' ) );
+                               window.alert( mediaWiki.msg( 
'donate_interface-error-msg-general' ) );
                                $( '#paymentContinue' ).show();
                                $( '#paymentContinueBtn' ).addClass( 'enabled' 
);
                        },
                        complete: function () {
-                               $('#overlay').hide();
+                               $( '#overlay' ).hide();
                        }
-               });
+               } );
        }
-});
+} );
diff --git a/worldpay_gateway/forms/js/worldpay.js 
b/worldpay_gateway/forms/js/worldpay.js
index 353aa7a..f7aa04d 100644
--- a/worldpay_gateway/forms/js/worldpay.js
+++ b/worldpay_gateway/forms/js/worldpay.js
@@ -3,7 +3,6 @@
  * This file is part of the DonationInterface Extension to MediaWiki
  * https://www.mediawiki.org/wiki/Extension:DonationInterface
  *
- * @section LICENSE
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
@@ -18,8 +17,6 @@
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
  */
 ( function ( $, mw ) {
 
@@ -30,7 +27,7 @@
        /**
         * Attempt to validate, on the client side, the form data.
         *
-        * @returns {boolean} True if all checked form data is valid
+        * @return {boolean} True if all checked form data is valid
         */
        function validateClientSide() {
                var cardType = $.payment.cardType( $accountNumber.val() ),
@@ -60,11 +57,11 @@
 
                types.forEach( function ( type ) {
                        var key;
-                       for ( key in type) {
-                               if ( $( type[key] ).hasClass('invalid') ) {
+                       for ( key in type ) {
+                               if ( $( type[ key ] ).hasClass( 'invalid' ) ) {
                                        $( key ).addClass( 'show' );
-                               } else if ( !$( type[key] ).hasClass( 'invalid' 
) ) {
-                                       $( key ).removeClass( 'show' 
).addClass('hide' );
+                               } else if ( !$( type[ key ] ).hasClass( 
'invalid' ) ) {
+                                       $( key ).removeClass( 'show' 
).addClass( 'hide' );
                                }
                        }
                } );
@@ -99,10 +96,10 @@
                        };
 
                $.each( fields, function ( idx, val ) {
-                       postdata[val] = $( '#' + val ).val();
-               });
+                       postdata[ val ] = $( '#' + val ).val();
+               } );
 
-               $.ajax({
+               $.ajax( {
                        url: mw.util.wikiScript( 'api' ),
                        data: postdata,
                        dataType: 'json',
@@ -115,21 +112,21 @@
                                        var errors = [];
                                        $.each( data.errors, function ( idx, 
str ) {
                                                errors.push( str );
-                                       });
+                                       } );
                                        window.alert( errors.join( '\n' ) );
-                                       $( '#paymentSubmitBtn' 
).removeClass('disabled');
+                                       $( '#paymentSubmitBtn' ).removeClass( 
'disabled' );
                                } else if ( data.ottResult ) {
                                        successCallback( data.ottResult );
                                } else {
                                        window.alert( mw.msg( 
'donate_interface-error-msg-general' ) );
-                                       $( '#paymentSubmitBtn' 
).removeClass('disabled');
+                                       $( '#paymentSubmitBtn' ).removeClass( 
'disabled' );
                                }
                        },
                        error: function ( xhr ) {
                                window.alert( mw.msg( 
'donate_interface-error-msg-general' ) );
-                               $( '#paymentSubmitBtn' 
).removeClass('disabled');
+                               $( '#paymentSubmitBtn' ).removeClass( 
'disabled' );
                        }
-               });
+               } );
        }
 
        /**
@@ -152,13 +149,13 @@
                                type: 'hidden',
                                name: name,
                                value: value
-                       }));
+                       } ) );
                }
 
                // Add the required elements to the form
                addHFtoF( 'Action', 'Add' );
                addHFtoF( 'AcctName', [ $( '#fname' ).val(), $( '#lname' 
).val() ].join( ' ' ).trim() );
-               addHFtoF( 'AcctNumber', $accountNumber.val().replace(/\s+/g, 
'') );
+               addHFtoF( 'AcctNumber', $accountNumber.val().replace( /\s+/g, 
'' ) );
                addHFtoF( 'ExpMonth', ( '0' + expiry.month ).slice( -2 ) );
                addHFtoF( 'ExpYear', ( '000' + expiry.year ).slice( -4 ) );
 
@@ -195,7 +192,7 @@
                $accountExpiry.payment( 'formatCardExpiry' );
                $accountCVC.payment( 'formatCardCVC' );
 
-               $( '.form-control' ).keypress( function (e) {
+               $( '.form-control' ).keypress( function ( e ) {
                        if ( e.which === 13 ) {
                                submitForm();
                        }
@@ -205,22 +202,22 @@
                        submitForm();
                } );
 
-               $( '#ddTestOptions').click( function () {
-                       $( '#ddTestCCArea' 
).removeClass('hide').addClass('show');
-               });
+               $( '#ddTestOptions' ).click( function () {
+                       $( '#ddTestCCArea' ).removeClass( 'hide' ).addClass( 
'show' );
+               } );
                $( '#cvv-info' ).hover( function () {
                        $( '#cvv-codes' ).show();
                }, function () {
                        $( '#cvv-codes' ).hide();
-               });
+               } );
                $( '#cvv-info' ).click( function () {
                        $( '#cvv-codes' ).addClass( 'popped' ).show();
                        $( 'body' ).addClass( 'pop-shown' );
                        return false;
-               });
+               } );
                $( document ).on( 'click', 'body.pop-shown', function () {
                        $( '.popped' ).removeClass( 'popped' ).hide();
                        $( 'body' ).removeClass( 'pop-shown' );
-               });
-       });
-})( jQuery, mediaWiki );
+               } );
+       } );
+}( jQuery, mediaWiki ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic41c351c880d1f6186448777379ebeaabfbb05c8
Gerrit-PatchSet: 10
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Paladox <[email protected]>
Gerrit-Reviewer: AndyRussG <[email protected]>
Gerrit-Reviewer: Awight <[email protected]>
Gerrit-Reviewer: Cdentinger <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Jforrester <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: Paladox <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: Ssmith <[email protected]>
Gerrit-Reviewer: Umherirrender <[email protected]>
Gerrit-Reviewer: XenoRyet <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to