Remove progress updates (execution is too fast for them to show up on any decent computer)

This commit is contained in:
Lavender 2021-03-27 20:23:52 -07:00
parent 72890d3213
commit c7f25ae1ab
Signed by: endie
GPG key ID: CC5162D7C2146F01

View file

@ -1,14 +1,8 @@
var request = new XMLHttpRequest() var request = new XMLHttpRequest()
request.open("GET", "https://cors-proxy.blaseball-reference.com/database/allTeams", true) request.open("GET", "https://cors-proxy.blaseball-reference.com/database/allTeams", true)
var progress = document.getElementById("progress")
var progressIndicator = progress.innerHTML
progressIndicator = "Sending request to Blaseball..."
request.send(); request.send();
request.onload = function() { request.onload = function() {
progressIndicator = "Parsing data..."
var teams = JSON.parse(this.response) var teams = JSON.parse(this.response)
var totals = teams.map(team => team.lineup.length + team.rotation.length) var totals = teams.map(team => team.lineup.length + team.rotation.length)
// Get all player counts that there are from greatest to least // Get all player counts that there are from greatest to least
@ -22,7 +16,6 @@ request.onload = function() {
} }
) )
progressIndicator = "Displaying data..."
// Now make headers & lists for all the player counts // Now make headers & lists for all the player counts
playercounts.forEach(function(item) { playercounts.forEach(function(item) {
document.body.insertAdjacentHTML("beforeend", "<h1>" document.body.insertAdjacentHTML("beforeend", "<h1>"
@ -42,5 +35,5 @@ request.onload = function() {
+ " pitchers)</li>") + " pitchers)</li>")
}) })
progress.remove() document.getElementById("progress").remove()
} }