2015-04-02 17:44:49 -06:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
2015-04-03 16:52:43 -06:00
|
|
|
<head>
|
|
|
|
<title>Scoreboard</title>
|
2015-04-19 23:14:31 -06:00
|
|
|
<link rel="stylesheet" href="style.css" type="text/css">
|
2017-11-12 16:24:49 -07:00
|
|
|
<style>
|
|
|
|
#info {
|
|
|
|
max-width: 20em;
|
|
|
|
position: absolute;
|
|
|
|
opacity: 0.8;
|
|
|
|
bottom: 1em;
|
|
|
|
right: 10em;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<script src="d3.js" async></script>
|
2015-04-19 23:14:31 -06:00
|
|
|
<script src="scoreboard.js" async></script>
|
2015-04-03 16:52:43 -06:00
|
|
|
<script>
|
2017-11-12 16:24:49 -07:00
|
|
|
|
|
|
|
var type = "original";
|
|
|
|
var interval = 60000;
|
|
|
|
|
|
|
|
function preinit()
|
|
|
|
{
|
|
|
|
var url = location.href;
|
|
|
|
url = new URL(url);
|
|
|
|
type = url.searchParams.get("type");
|
|
|
|
interval = url.searchParams.get("interval");
|
|
|
|
if(!type)
|
|
|
|
{
|
|
|
|
type = "original";
|
|
|
|
}
|
|
|
|
if(!interval)
|
|
|
|
{
|
|
|
|
interval = 60000;
|
|
|
|
}
|
|
|
|
if(type == "original")
|
|
|
|
{
|
|
|
|
document.getElementById("originalButton").checked = true;
|
|
|
|
}
|
|
|
|
else if(type == "total")
|
|
|
|
{
|
|
|
|
document.getElementById("totalButton").checked = true;
|
|
|
|
}
|
|
|
|
else if(type == "time")
|
|
|
|
{
|
|
|
|
document.getElementById("timelineButton").checked = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function updateType(newType)
|
|
|
|
{
|
|
|
|
type = newType;
|
|
|
|
init();
|
|
|
|
}
|
|
|
|
|
2015-04-03 16:52:43 -06:00
|
|
|
function init() {
|
|
|
|
var sb = document.getElementById("scoreboard");
|
2017-11-12 16:24:49 -07:00
|
|
|
scoreboard(sb, true, type, interval);
|
2015-04-03 16:52:43 -06:00
|
|
|
}
|
2015-04-02 17:44:49 -06:00
|
|
|
|
2017-11-12 16:24:49 -07:00
|
|
|
window.addEventListener("load", preinit);
|
2015-04-03 16:52:43 -06:00
|
|
|
window.addEventListener("load", init);
|
2017-11-12 16:24:49 -07:00
|
|
|
|
2015-04-03 16:52:43 -06:00
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
2017-11-12 16:24:49 -07:00
|
|
|
<h1>Cyber Fire</h1>
|
|
|
|
<h2>
|
|
|
|
Scoreboard Type:
|
|
|
|
<input type="radio" name="type" id="originalButton" value="original" onclick="updateType('original');"> Scored Points
|
|
|
|
<input type="radio" name="type" id="totalButton" value="total" onclick="updateType('total');"> All Points
|
|
|
|
<input type="radio" name="type" id="timelineButton" value="timeline" onclick="updateType('time');"> Timeline
|
|
|
|
</h2>
|
2015-04-03 16:52:43 -06:00
|
|
|
<div id="scoreboard"></div>
|
|
|
|
</body>
|
2015-04-02 17:44:49 -06:00
|
|
|
</html>
|
2017-11-12 16:24:49 -07:00
|
|
|
|