diff options
Diffstat (limited to 'hosted/stats.js')
-rw-r--r-- | hosted/stats.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/hosted/stats.js b/hosted/stats.js new file mode 100644 index 0000000..f82368f --- /dev/null +++ b/hosted/stats.js @@ -0,0 +1,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(); +}); \ No newline at end of file |