From 886adb5e0f5d6fc9ba0f37cec86c645f05e05bb4 Mon Sep 17 00:00:00 2001 From: petrus comestor Date: Fri, 16 May 2025 20:46:42 -0400 Subject: rm past events --- static/script.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 static/script.js (limited to 'static') diff --git a/static/script.js b/static/script.js new file mode 100644 index 0000000..f21372a --- /dev/null +++ b/static/script.js @@ -0,0 +1,12 @@ +// optional +var date = new Date(new Date().toDateString()); +date.setDate(date.getDate() - 1); +console.log(date) +for (var el of document.getElementsByClassName('event')) { + console.log(el) + var d = Date.parse(el.getAttribute('data-timestamp')) + if (d < date) { + console.log("remove", d) + el.remove() + } +} -- cgit v1.2.3