/
index.html
41 lines (41 loc) · 1.44 KB
/
index.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
<html>
<head>
<title>Gla3dr's Streaming Schedule</title>
<link rel="icon" type="image/icon" href="favicon.ico"/>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
</head>
<body>
<iframe src="https://www.google.com/calendar/embed?showPrint=0&showTabs=0&showCalendars=0&height=600&wkst=1&bgcolor=%23333399&src=qoko9nutfo2ignoon7p1g44vig%40group.calendar.google.com&color=%2323164E&src=en.canadian%23holiday%40group.v.calendar.google.com&color=%23A32929&ctz=America%2FRegina" style=" border-width:0 " width="800" height="600" frameborder="0" scrolling="no"></iframe>
<div id="container">
<div id="stream-status">
<div id="label">Stream is currently:</div>
<div id="status"></div>
</div>
<div id="info">
<div id="playing-label"></div>
<div id="playing"></div>
</div>
</div>
<script>
$.getJSON('https://api.twitch.tv/kraken/streams/gla3dr', function(data) {
if(data['stream'] == null) {
//Offline
$('#status')
.css('background-color', 'red')
.text('Offline');
$('#info').hide();
}
else {
//Online
$('#status')
.css('background-color', 'lime')
.text('Live');
$('#playing-label').text('Playing:');
$('#playing').text(data['stream']['game']);
$('info').show();
}
});
</script>
</body>
</html>