-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
63 lines (56 loc) · 2.3 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!doctype html>
<html>
<head>
<title>Sirius Kiosk</title>
<style type="text/css">
html, body {
overflow: hidden;
margin: auto;
height: 100%;
width: 100%;
}
#defaultCountdown { width: 40px; height: 35px; position:fixed; bottom:0px; right:0px; }
</style>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<style type="text/css">@import "countdown/jquery.countdown.css";</style>
<script type="text/javascript" src="countdown/jquery.countdown.js"></script>
<script>
function load() {
var urls = [
'http://ohgo.com/dashboard/cincinnati',
'highway.html',
'http://www.accuweather.com/en/us/cincinnati-oh/45246/hourly-weather-forecast/19409_pc',
'http://www.wunderground.com/cgi-bin/findweather/getForecast?brand=wxmap&query=39.23778,-84.47250&lat=39.23778&lon=-84.47250&zoom=9&type=map&units=english&wxsn=0&rad=1&rad.num=6&rad.spd=25&rad.opa=70&rad.stm=0&rad.type=N0R&rad.type2=&rad.smo=1&rad.mrg=0&sat=0&cams=0&svr=0&tor=1&tor.show=now&ib=0',
'http://news.google.com',
'http://xkcd.com/',
];
var delaySec = [ 30, 10, 20, 20, 30, 20 ];
var pos = 0;
var lastID = -1;
next();
function next()
{
// clear last callback
if(lastID != -1) clearInterval(lastID);
// wrap position number?
if(pos == urls.length) pos = 0; // reset the counter
// rotate to new page
document.getElementById('rotate').src = urls[pos];
// set new callback
lastID = setInterval(next, delaySec[pos]*1000);
// set new countdown
$('#defaultCountdown').countdown('destroy');
delayStr = '+' + delaySec[pos];
$('#defaultCountdown').countdown({until: delayStr, compact: true, format: 'S'});
// increment position
pos++;
}
}
window.onload = load;
</script>
</head>
<body>
<div id="defaultCountdown"></div>
<iframe id="rotate" frameborder=0 border=0 width="100%" height="100%"></iframe>
</body>
</html>