You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
516 B

Echo.channel('score')
.listen('ScoreUpdatedEvent', (e) => {
var sel = "[data-team="+e.team_slug+"] [data-mission="+e.mission_slug+"]";
$(sel+" .team-icon span").text(e.score);
if(e.complete) {
$(sel+".team-icon").removeClass("empty");
} else {
$(sel+".team-icon").addClass("empty");
}
$("[data-team="+e.team_slug+"] .total.score b").text(e.team_score);
console.log(e);
});
setTimeout(function(){
window.location.reload();
}, 300*1000);