diff --git a/src/scoreboard b/src/scoreboard index c329214..8d159ad 100755 --- a/src/scoreboard +++ b/src/scoreboard @@ -95,7 +95,7 @@ BEGIN { # Get team colors and names for (team in teams) { - fn = "/var/lib/ctf/teams/colors/" team ".color" + fn = "/var/lib/ctf/teams/colors/" team getline colors_by_team[team] < fn close(fn) @@ -129,12 +129,12 @@ BEGIN { # Provide raw data for the chart print " " # Set up team colors and a few page-specific styles @@ -161,7 +165,7 @@ BEGIN { print " " print "

Scoreboard

" print "

" - print " " + print "
" print " " print " " diff --git a/www/scoreboard.js b/www/scoreboard.js index 475bf27..d3c8ce1 100644 --- a/www/scoreboard.js +++ b/www/scoreboard.js @@ -105,3 +105,16 @@ function restore(cls) { } +var state = 0; +function cycle() { + if (state == 0) { + v = document.getElementById("scoreboard"); + i = document.getElementById("chart"); + } else { + v = document.getElementById("chart"); + i = document.getElementById("scoreboard"); + } + v.style.display = "block"; + i.style.display = "none"; + state = (state + 1) % 2; +}
Overall