about summary refs log tree commit diff
path: root/hosted/stats.js
blob: f82368fb823cf793eb8735c704ff1b9cea8d18d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
function loadStatsAndRender() {
    $.get("/api/getStats").done(function(data) {
        var result = jQuery.parseJSON(data);
        $("#_teamScore").text(result["score"]);
        // Re-run in 10s
        setTimeout(function(){loadStatsAndRender();}, 10000);
    });
}

$(document).ready(function() {
    loadStatsAndRender();
});