From 2c70049bd77945418878d685008c725e7ead31e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 12 Jul 2020 15:57:41 +0200 Subject: Remove parents_until. --- static/script.js | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/static/script.js b/static/script.js index 1679c74e..91913946 100644 --- a/static/script.js +++ b/static/script.js @@ -16,16 +16,6 @@ function date_to_percent (date) { return (date.getHours() + (date.getMinutes() / 60)) * 100/24; } -function parents_until (element, obj) { - if (element === null) { - return null; - } else if (element.id == obj.id || element.classList.contains(obj.class)) { - return element; - } else { - return parents_until (element.parentElement, obj); - } -} - function decimal_time_to_date (time, date) { let hour = Math.floor(time); let minute = (time - hour) * 60; -- cgit v1.2.3