diff options
author | petrus comestor <petrus@comestor.org> | 2025-05-16 20:46:42 -0400 |
---|---|---|
committer | petrus comestor <petrus@comestor.org> | 2025-05-16 20:46:42 -0400 |
commit | 886adb5e0f5d6fc9ba0f37cec86c645f05e05bb4 (patch) | |
tree | 9a5cdd958ecdd12fd8e4b333a4f5e094e8e7a4e6 /static | |
parent | 7a7fc9c2e70ae7729c0af67585bce957faa0386c (diff) |
rm past events
Diffstat (limited to 'static')
-rw-r--r-- | static/script.js | 12 |
1 files changed, 12 insertions, 0 deletions
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() + } +} |