diff --git a/index.html b/index.html index ef19de3..679b894 100644 --- a/index.html +++ b/index.html @@ -9,8 +9,6 @@

Loading...

-
-

Source code: diff --git a/main.js b/main.js index 58f7e31..d8e97e7 100644 --- a/main.js +++ b/main.js @@ -10,14 +10,12 @@ request.onload = function() { let teams = JSON.parse(this.response) let totals = teams.map(team => team.lineup.length + team.rotation.length) - - let results = document.getElementById("results") // Get all player counts that there are from greatest to least // & make headers & lists for them - totals.slice().sort((x, y) => y - x) + totals.slice().sort((x, y) => x - y) .filter((item, pos, array) => !pos || item !== array[pos - 1]) .forEach(function(item) { - results.insertAdjacentHTML("beforeend", + document.body.insertAdjacentHTML("afterbegin", `

${item} player${ending(item)}

`) })