Skip to content

Commit 50ab4e8

Browse files
committed
Use a more appropriate element removal method
1 parent 9913769 commit 50ab4e8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/includes/events.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
const time = new Date(
66
event.querySelector('time[datetime]').getAttribute('datetime')
77
);
8-
// hide the event until the end of the day it's scheduled for
98
time.setHours(23, 59, 59, 999);
9+
// remove future events
1010
if (Date.now() < time.getTime()) {
11-
// TIL this is a thing, wow!
12-
event.outerHTML = '';
11+
event.remove();
1312
}
1413
}
1514
})();

0 commit comments

Comments
 (0)