From b1f2f67a047e1c595ff2a2a7b4a571c72fdcde6d Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 21 Dec 2024 12:07:31 +0000 Subject: better pubs notofication fiy and also fix a javascript error and remove last bit of jquery from notifications --- view/tpl/notifications_widget.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'view/tpl') diff --git a/view/tpl/notifications_widget.tpl b/view/tpl/notifications_widget.tpl index 3347378b5..f884ff1f6 100644 --- a/view/tpl/notifications_widget.tpl +++ b/view/tpl/notifications_widget.tpl @@ -7,9 +7,9 @@ var sse_fallback_interval; var sse_sys_only = {{$sys_only}}; - $(document).ready(function() { + document.addEventListener("DOMContentLoaded", function() { let notificationsWrapper = document.getElementById('notifications_wrapper'); - let notificationsParent = notificationsWrapper.parentElement.id; + let notificationsParent = notificationsWrapper ? notificationsWrapper.parentElement.id : null; let notificationsBtn = document.querySelector('.notifications-btn'); // Event listener for notifications button -- cgit v1.2.3