From 588c4ceb78fae443ca8f9446d256f5474a3bf66a Mon Sep 17 00:00:00 2001 From: Debulois Date: Sat, 7 May 2022 12:23:11 +0200 Subject: Ré-écriture du JS pour le rendre CSP compliant MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Static/Js/notification.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Static/Js/notification.js') diff --git a/Static/Js/notification.js b/Static/Js/notification.js index 4747bc3..59094e1 100644 --- a/Static/Js/notification.js +++ b/Static/Js/notification.js @@ -11,6 +11,14 @@ function toggle_notif() { document.getElementById("notif").classList.toggle("show_notif"); } +document.getElementById("notifClose").addEventListener("click", () => { + toggle_notif(); +}); + +document.getElementById("notifRedirect").addEventListener("click", () => { + redirect("Template/myMission"); +}); + // Timeout pour ne pas non plus agressé le client setTimeout(() => { toggle_notif() -- cgit v1.2.3