app.champlookup = JSON.parse(data);
});
}
+let matchesHtml = [];
function getMatches() {
$.ajax("/lol/matches?region=" + app.region + "&summoner=" + app.summoner)
.done((data) => {
app.matches = JSON.parse(data);
+ matchesHtml = [];
+ matchesHtml.push("<tr><th></th><th>Game Type</th><th>Time</th></tr>");
for (m in app.matches) {
app.matches[m].championString = app.champlookup[app.matches[m].champion];
app.matches[m].queueString = app.queues[app.matches[m].queue];
app.matches[m].timestampString = new Date(app.matches[m].timestamp).toLocaleString();
+ let newTag = "<tr><td><img class='championIcon' src='http://ddragon.leagueoflegends.com/cdn/8.24.1/img/champion/" + app.matches[m].championString + ".png'></img></td>";
+ newTag = newTag.concat("<td>" + app.matches[m].queueString + "</td>");
+ newTag = newTag.concat("<td>" + app.matches[m].timestampString + "</td>");
+ newTag = newTag.concat("</tr>");
+ console.log(newTag);
+ matchesHtml.push(newTag);
}
+ var clusterize = new Clusterize({
+ rows: matchesHtml,
+ scrollId: 'scrollArea',
+ contentId: 'contentArea',
+ });
});
}
function getInfo() {