From 6190157b2ffadc77fac6b2ded20ac26c3c6ca562 Mon Sep 17 00:00:00 2001 From: Lavender Date: Mon, 5 Apr 2021 11:36:04 -0700 Subject: [PATCH] Remove results div --- index.html | 2 -- main.js | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) 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)}

    `) })