From 3a77e5fd21e6bc0f9062fbfd734d5dcc5fda8f1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 5 Apr 2020 23:04:41 +0200 Subject: Fix JS for current time. --- static/script.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'static') 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; -- cgit v1.2.3