Skip to content
This repository has been archived by the owner on Nov 26, 2022. It is now read-only.

Latest commit

 

History

History
106 lines (92 loc) · 2.72 KB

results.md

File metadata and controls

106 lines (92 loc) · 2.72 KB
layout title key
full-single-page-md
Official Results
results

The official results was announced on the closing ceremony.

Filter By Country:
<script> const country_index = 1; const medal_index = 3; var data = []; var table_el = document.getElementById("results"); var filter_el = document.getElementById("filter"); var countries = [ "All Countries" ]; function onlyUnique(value, index, self) { return self.indexOf(value) === index; } function populateCountries() { countries = countries.concat(data.map(c => c[country_index]) .slice(1).filter(onlyUnique).sort()); } function h (parent, tag) { var el = document.createElement(tag); parent.append(el); return el; } function httpGetAsync(theUrl, callback) { var xmlHttp = new XMLHttpRequest(); xmlHttp.onreadystatechange = function() { if (xmlHttp.readyState == 4 && xmlHttp.status == 200) callback(xmlHttp.responseText); } xmlHttp.open("GET", theUrl, true); // true for asynchronous xmlHttp.send(null); } function processCSV(allText) { var allTextLines = allText.split(/\r\n|\n/); var lines = []; for (var i=0; i e.target.value === "All Countries" || e.target.value === c[country_index])) ); } function populateFilter() { filter_el.addEventListener("change", onFilterChange); for (var i = 0; i