wikimedia/mediawiki-extensions-DonationInterface

View on GitHub
modules/js/ext.donationInterface.monthlyConvert_003.js

Summary

Maintainability
A
0 mins
Test Coverage
( function ( $ ) {
    $( function () {
        var donatedAmount = +$( '#amount' ).val(),
            donatedAmountFormatted = donatedAmount.toLocaleString(
            $( '#language' ).val() + '-' + $( '#country' ).val(),
            {
                currency: $( '#currency' ).val(),
                style: 'currency'
            }
        );

        $( '.mc-convert-donated-amount' ).text( donatedAmountFormatted );
    } );
} )( jQuery );