Move link to source code to bottom of page
This commit is contained in:
		
							parent
							
								
									9529bafac6
								
							
						
					
					
						commit
						24f9d89fec
					
				
					 2 changed files with 9 additions and 5 deletions
				
			
		
							
								
								
									
										10
									
								
								index.html
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								index.html
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -6,15 +6,17 @@
 | 
			
		|||
    </title>
 | 
			
		||||
</head>
 | 
			
		||||
<body>
 | 
			
		||||
    <h1 id="progress">
 | 
			
		||||
        Loading...
 | 
			
		||||
    </h1>
 | 
			
		||||
    <div id="results">
 | 
			
		||||
    </div>
 | 
			
		||||
    <h1>
 | 
			
		||||
        Source: 
 | 
			
		||||
        Source code: 
 | 
			
		||||
        <a href="https://gitdab.com/endie/team-big">
 | 
			
		||||
            https://gitdab.com/endie/team-big
 | 
			
		||||
        </a>
 | 
			
		||||
    </h1>
 | 
			
		||||
    <h1 id="progress">
 | 
			
		||||
        Loading...
 | 
			
		||||
    </h1>
 | 
			
		||||
    <script src="main.js">
 | 
			
		||||
    </script>
 | 
			
		||||
    <noscript>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										4
									
								
								main.js
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								main.js
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -10,12 +10,14 @@ 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)
 | 
			
		||||
        .filter((item, pos, array) => !pos || item !== array[pos - 1])
 | 
			
		||||
        .forEach(function(item) {
 | 
			
		||||
            document.body.insertAdjacentHTML("beforeend",
 | 
			
		||||
            results.insertAdjacentHTML("beforeend",
 | 
			
		||||
                `<h1>${item} player${ending(item)}</h1>
 | 
			
		||||
                 <ul id="tlist${item}"></ul>`)
 | 
			
		||||
    })
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue