-
Notifications
You must be signed in to change notification settings - Fork 0
/
scoreboard.html
138 lines (117 loc) · 4.53 KB
/
scoreboard.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<script language="JavaScript" type="text/javascript">
window.addEventListener('message',function(event) {
var data = event.data
switch (data.type) {
case 'label':
document.getElementById('homeName').innerHTML = data.homeName;
document.getElementById('guestName').innerHTML = data.guestName;
document.getElementById('periodHeader').innerHTML = "PERIOD "+data.period;
break;
case 'clock':
document.getElementById('pClock').innerHTML = data.pClock;
document.getElementById('jClock').innerHTML = data.jClock;
document.getElementById('jamNumber').innerHTML = data.jamNumber;
document.getElementById('jamHeader').innerHTML = data.jcLabel;
document.getElementById('ad').src = data.ad;
break;
case 'score':
document.getElementById('homeScore').innerHTML = data.home;
document.getElementById('guestScore').innerHTML = data.guest;
document.getElementById('homeJamScore').innerHTML = data.homeJam;
document.getElementById('guestJamScore').innerHTML = data.guestJam;
document.getElementById('guestTimeouts').innerHTML = data.guestTO;
document.getElementById('guestReviews').innerHTML = data.guestOR;
document.getElementById('homeTimeouts').innerHTML = data.homeTO;
document.getElementById('homeReviews').innerHTML = data.homeOR;
break;
case 'htToggle':
if (data.status == 1) {
var halftime = '<div id="htHeader">'+data.htheadertext+'</div>';
halftime += '<div id="htclock">'+data.htminutes+'</div>';
halftime += '<div id="adblock"><img id="htAd" src="images/htAd1.jpg"></div>';
var overlay = document.createElement("div");
overlay.setAttribute("id","overlay");
overlay.setAttribute("class","overlay");
document.body.appendChild(overlay);
overlay.innerHTML=halftime;
} else if (data.status == 0) {
document.body.removeChild(document.getElementById("overlay"));
}
break;
case 'htUpdate':
document.getElementById('htclock').innerHTML = data.htminutes;
document.getElementById('htAd').src = data.htad;
break;
};
});
/* ------- audit line ----------*/
/*
function refreshClock() {
if (jt[3] < 0 ) { t = 0; } else { t = jt[3]; }
// The rest of this is copy/pasted from the
// parent window update function. :-(
$('#periodHeader').html("PERIOD "+pt[3]);
$('#jamHeader').html(labels[t]);
}
function refreshManual() {
$('#homeScore').html(home[0]);
$('#guestScore').html(guest[0]);
$('#homeJamScore').html(home[1]);
$('#guestJamScore').html(guest[1]);
$('#homeTimeouts').html(" "+home[4]+home[5]+" ");
$('#guestTimeouts').html(" "+guest[4]+guest[5]+" ");
}
function nextAd(adurl) {
$('#ad').attr('src',adurl);
}
*/
</script>
<link rel="stylesheet" type="text/css" href="scoreboard.css" />
<title></title>
</head><!-- <body onload="boardRefresh();"> -->
<div id="master">
<div id="header" class="adSpace">
<img id="scoreboardHeader" src="images/header.jpg">
</div>
<div id="scoreboardFrame">
<div class="scores" id="home">
<div class="scoreHeaders" id="homeName">HOME<br>TEAM</div>
<div class="scoreNumbers" id="homeScore">0</div>
</div>
<div id="allClocksFrame">
<div class="clock" id="period">
<div class="clockHeaders" id="periodHeader">PERIOD 1</div>
<div class="clockTimes" id="pClock">30:00</div>
</div>
<div class="clock" id="jam">
<div class="clockHeaders" id="jamHeader">JAM CLOCK</div>
<div class="clockTimes" id="jClock">2:00</div>
</div>
<div class="clock" id="timeOut">
<span class="timeouts" id="homeTimeouts" style="float: left"> 3</SPAN>
<span class="timeoutHeaders" id="TOHeader">Timeouts</SPAN>
<span class="timeouts" id="guestTimeouts" style="float: right"> 3</SPAN>
</div>
<div class="clock" id="timeOut">
<span class="timeouts" id="homeReviews" style="float: left"> 1</SPAN>
<span class="timeoutHeaders" id="ORHeader">Reviews</SPAN>
<span class="timeouts" id="guestReviews" style="float: right"> 1</SPAN>
</div>
</div>
<div class="scores" id="guest">
<div class="scoreHeaders" id="guestName">GUEST<br>TEAM</div>
<div class="scoreNumbers" id="guestScore">0</div>
</div>
<div id="jamScoreFrame">
<span class="jamScores" id="homeJamScore" >00</span>
<span id="jamScoreTitle">JAM <span id="jamNumber">00</span> POINTS</span>
<span class="jamScores" id="guestJamScore">00</span>
</div>
</div>
<div id="footer">
<img id="ad" src="images/ad1.jpg">
</div>
</div>
</body></html>