-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
67 lines (56 loc) · 1.4 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
64
65
66
67
<!DOCTYPE html>
<html>
<head>
<title>Awesome Dashboard</title>
<style type="text/css" media="screen">
html * {
margin: 0; padding: 0;
}
iframe {
position: absolute;
overflow: auto;
top: 0; right: 0; bottom: 0; left: 0;
width: 100%; height: 100%;
}
#builds { z-index: 1; }
#charts { z-index: 0; }
</style>
</head>
<body>
<iframe id="builds" frameborder='0' src="builds.html"></iframe>
<iframe id="charts" frameborder='0' src="charts.html"></iframe>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(function(){
bindkeys();
standup();
function autoflip() {
// Flip the views every x seconds
var timer = 5 * 1000;
var id = setInterval(function() {
toggle();
}, timer);
}
function standup() {
var time = Date.now();
var hours = time.getHours();
var mins = time.getMinutes();
if(hours == 9 && (mins >= 25 && mins <= 50)) {
console.log('STANDUP TIME!');
toggle();
}
}
function toggle() {
var $view = $('#builds');
$view.toggle();
}
function bindkeys() {
$('body').keypress(function(event, ui) {
console.log('Bound `C` key to toggling between charts and builds');
if(event.which == 99) toggle();
});
}
});
</script>
</body>
</html>