|
@ -111,14 +111,21 @@ function populateBoard(){ |
|
|
var listBoard = document.getElementById("listBoard"); |
|
|
var listBoard = document.getElementById("listBoard"); |
|
|
var results = ""; |
|
|
var results = ""; |
|
|
var rankings = data.data.rankings; |
|
|
var rankings = data.data.rankings; |
|
|
|
|
|
var date = new Date(); |
|
|
|
|
|
var seconds = date.getSeconds(); |
|
|
|
|
|
var minutes = date.getMinutes(); |
|
|
|
|
|
var hour = date.getHours(); |
|
|
|
|
|
|
|
|
for (var i = rankings.length - 1; i >= 0; i--) { |
|
|
for (var i = rankings.length - 1; i >= 0; i--) { |
|
|
if( rankings[i].teamId == 235 ){ |
|
|
if( rankings[i].teamId == 235 ){ |
|
|
|
|
|
results += "<p>Updated "+hour+"h "+minutes+"m "+seconds+"s</p>"; |
|
|
results += "<h1>Cazziammolla Placement: "+rankings[i].rank+"</h1>"; |
|
|
results += "<h1>Cazziammolla Placement: "+rankings[i].rank+"</h1>"; |
|
|
results += "<h2>with a score of: "+rankings[i].score+"</h2>"; |
|
|
results += "<h2>with a score of: "+rankings[i].score+"</h2>"; |
|
|
if (rankings[i].rank != points && points != 0){ |
|
|
if (rankings[i].rank != points && points != 0){ |
|
|
score = rankings[i].rank; |
|
|
|
|
|
ringTheBell(); |
|
|
ringTheBell(); |
|
|
} |
|
|
} |
|
|
|
|
|
points = rankings[i].rank; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
@ -137,6 +144,8 @@ function populateBoard(){ |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
function updateLeaderBoard(){ |
|
|
function updateLeaderBoard(){ |
|
|
|
|
|
loadRankingJs('https://davar.icfpcontest.org/rankings.js?cachebuster='+ new Date().getTime()); |
|
|
|
|
|
|
|
|
var intervalID = setInterval( function(){ |
|
|
var intervalID = setInterval( function(){ |
|
|
loadRankingJs('https://davar.icfpcontest.org/rankings.js?cachebuster='+ new Date().getTime()); |
|
|
loadRankingJs('https://davar.icfpcontest.org/rankings.js?cachebuster='+ new Date().getTime()); |
|
|
}, 30000); |
|
|
}, 30000); |
|
|