-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
36 lines (33 loc) · 984 Bytes
/
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
<html>
<head>
<meta name = "viewport" content = "width = device-width">
<link href="commute.css" media="all" rel="stylesheet" type="text/css"/>
<script src='helper_funcs.js'></script>
<script src='bart_stop_times.js'></script>
<script src='app.js'></script>
</head>
<body>
<div id='chooser'>
<select id='option_select' onchange='show_hide_selector()'>
<option selected='true'>now</option>
<option>choose time</option>
</select>
</div>
<div id='display'></div>
<script>
enumerate_time();
var display = document.querySelector('#display');
var a = new app();
a.run(display);
document.querySelector('#time_select').onchange = function () {
var el = document.querySelector('#time_select').selectedOptions[0];
var d = new Date();
var t = el.innerHTML.split(':');
d.setHours(t[0]);
d.setMinutes(t[1]);
if (isNaN(d.getTime())) return;
a.run(display, d);
};
</script>
</body>
</html>