CoreFiles by mySites.guru
language-chooser.js26 lines, 625 bytes, from wordpress-4.2.21.zip
Raw History Compare with 4.2.20
md5
09e20150c7561d0330d7158f744abb4a
sha1
d28010a21e2f2d9aa04bca190dec16216520a2ab
sha256
a70b281056d86a54c65bb4d17a4ebca74212f0bc7370d5540e02aaf3edcf8913
jQuery( function($) {

var select = $( '#language' ),
	submit = $( '#language-continue' );

if ( ! $( 'body' ).hasClass( 'language-chooser' ) ) {
	return;
}

select.focus().on( 'change', function() {
	var option = select.children( 'option:selected' );
	submit.attr({
		value: option.data( 'continue' ),
		lang: option.attr( 'lang' )
	});
});

$( 'form' ).submit( function() {
	// Don't show a spinner for English and installed languages,
	// as there is nothing to download.
	if ( ! select.children( 'option:selected' ).data( 'installed' ) ) {
		$( this ).find( '.step .spinner' ).css( 'visibility', 'visible' );
	}
});

});

The same content is in 497 releases, WordPress 4.0-beta3 to 5.0.31. See them all, or every version of this file.