Preload the flag images after the page has finished loading.

master
Pacman Ghost 5 years ago
parent 1075a555d7
commit f81c148220
  1. 6
      vasl_templates/webapp/static/main.js

@ -495,6 +495,12 @@ function update_page_load_status( id )
} ).fail( function( xhr, status, errorMsg ) {
showErrorMsg( "Can't get the startup messages:<div class='pre'>" + escapeHTML(errorMsg) + "</div>" ) ;
} ) ;
// preload the flag images (so that the player droplist renders immediately)
for ( var nat in gTemplatePack.nationalities ) {
$("body").append( $(
"<img src='" + make_player_flag_url(nat) + "' style='display:none;'>"
) ) ;
}
}
}

Loading…
Cancel
Save