diff options
Diffstat (limited to 'static/script.js')
-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() + } +} |