X-Git-Url: https://gitweb.ps.run/lolstats/blobdiff_plain/836aefac5aba1a288561cf1bd5a2cdb9a060097e..6377dc0c14b8e16dfbaa81e00734266b6fcd0365:/html/script.js diff --git a/html/script.js b/html/script.js index c2d4fd5..fdd261f 100644 --- a/html/script.js +++ b/html/script.js @@ -103,15 +103,29 @@ function getChampLookup() { 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("Game TypeTime"); 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 = ""; + newTag = newTag.concat("" + app.matches[m].queueString + ""); + newTag = newTag.concat("" + app.matches[m].timestampString + ""); + newTag = newTag.concat(""); + console.log(newTag); + matchesHtml.push(newTag); } + var clusterize = new Clusterize({ + rows: matchesHtml, + scrollId: 'scrollArea', + contentId: 'contentArea', + }); }); } function getInfo() {