Remove results div
This commit is contained in:
parent
24f9d89fec
commit
6190157b2f
2 changed files with 2 additions and 6 deletions
|
@ -9,8 +9,6 @@
|
|||
<h1 id="progress">
|
||||
Loading...
|
||||
</h1>
|
||||
<div id="results">
|
||||
</div>
|
||||
<h1>
|
||||
Source code:
|
||||
<a href="https://gitdab.com/endie/team-big">
|
||||
|
|
6
main.js
6
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",
|
||||
`<h1>${item} player${ending(item)}</h1>
|
||||
<ul id="tlist${item}"></ul>`)
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue