Skip to content

Commit

Permalink
Show total team scores together with checkpoints overview by @VBelozy…
Browse files Browse the repository at this point in the history
  • Loading branch information
modos189 committed Nov 27, 2018
1 parent 53d6661 commit 35f1467
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions code/region_scoreboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,16 @@ function regionScoreboardScoreHistoryTable(result) {
var history = result.scoreHistory;
var table = '<table class="checkpoint_table"><thead><tr><th>Checkpoint</th><th>Enlightened</th><th>Resistance</th></tr></thead>';

var sum = [0, 0];

for(var i=0; i<history.length; i++) {
sum[0] += parseInt(history[i][1]);
sum[1] += parseInt(history[i][2]);
table += '<tr><td>' + history[i][0] + '</td><td>' + digits(history[i][1]) + '</td><td>' + digits(history[i][2]) + '</td></tr>';
}

table = '<div class="scores_total">Total: <span><span class="enl">' + digits(sum[0]) + '</span><span class="res">' + digits(sum[1]) + '</span></div>' + table;

table += '</table>';
return table;
}
Expand Down
4 changes: 4 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1241,6 +1241,10 @@ g.checkpoint:hover circle {
padding-left: 10px;
}

.scores_total span {
padding: 0 1.5em;
}

.text-overflow-ellipsis {
display: inline-block;
overflow: hidden;
Expand Down

0 comments on commit 35f1467

Please sign in to comment.