diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-04-05 23:04:41 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-04-05 23:04:41 +0200 |
commit | 3a77e5fd21e6bc0f9062fbfd734d5dcc5fda8f1e (patch) | |
tree | a697a5ca332efa1b98e89369c1db81a5aadcd3b9 /static/script.js | |
parent | Minor changes. (diff) | |
download | calp-3a77e5fd21e6bc0f9062fbfd734d5dcc5fda8f1e.tar.gz calp-3a77e5fd21e6bc0f9062fbfd734d5dcc5fda8f1e.tar.xz |
Fix JS for current time.
Diffstat (limited to 'static/script.js')
-rw-r--r-- | static/script.js | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/static/script.js b/static/script.js index dcc7285f..7f7a235b 100644 --- a/static/script.js +++ b/static/script.js @@ -76,12 +76,7 @@ var bar_object = false function update_current_time_bar () { var now = new Date() - var today = document - .getElementById(time_to_date(now)) - .parentElement - .parentElement - - var event_area = today.getElementsByClassName("events")[0] + var event_area = document.getElementById(time_to_date(now)) if (bar_object) { bar_object.parentNode.removeChild(bar_object) @@ -101,9 +96,7 @@ function toggle_event_pupup () { } window.onload = function () { - console.log("Running"); - /* update_current_time_bar() // once a minute for now, could probably be slowed to every 10 minutes window.setInterval(update_current_time_bar, 1000 * 60) @@ -113,7 +106,6 @@ window.onload = function () { c.onmouseup = onmouseuphandler; c.onmousemove = onmousemovehandler; } - */ for (let e of document.getElementsByClassName("event-inner")) { e.onclick = toggle_event_pupup; |