Hide event option

Reading Time: < 1 minute

Added option to hide Events. Next to all event notifications, an “X” will now be displayed, which hides the notification if clicked until a new event notification is shown.

For this to work, I added an ID section to the event.json which gives every new event a unique identifier. If the “X” button on the event is clicked, a cookie is set containing the current event ID. A PHP section compares the cookie ID against the current event ID, and if they’re the same, the event will not be displayed.

This effectively hides the current event for a user until a new event is happening.

Share