wikimedia/mediawiki-extensions-Translate

View on GitHub
resources/js/ext.translate.special.importtranslations.js

Summary

Maintainability
A
0 mins
Test Coverage
( function () {
    'use strict';

    function buttoner( $input ) {
        if ( $input.val ) {
            $( 'input[type=submit]' ).prop( 'disabled', false );
        } else {
            $( 'input[type=submit]' ).prop( 'disabled', true );
        }
    }

    $( function () {
        var $input = $( '#mw-translate-up-local-input' );
        $input.on( 'change', function () {
            buttoner( $input );
        } );

        buttoner( $input );
    } );
}() );