From a8a1af6bea369113b6ca684b9e58c9982b3c60e0 Mon Sep 17 00:00:00 2001 From: Aevann Date: Sat, 28 Jan 2023 12:39:44 +0200 Subject: [PATCH] dont use implicit addEventListener --- files/assets/js/core.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/files/assets/js/core.js b/files/assets/js/core.js index 23bc21cc6..97d5b85c2 100644 --- a/files/assets/js/core.js +++ b/files/assets/js/core.js @@ -133,17 +133,17 @@ if (location.pathname != '/submit') }); } -addEventListener('show.bs.modal', function (e) { +document.addEventListener('show.bs.modal', function (e) { location.hash = "modal"; }); -addEventListener('hide.bs.modal', function (e) { +document.addEventListener('hide.bs.modal', function (e) { if(location.hash == "#modal") { history.back(); } }); -addEventListener('hashchange', function (e) { +window.addEventListener('hashchange', function (e) { if(location.hash != "#modal") { const curr_modal = bootstrap.Modal.getInstance(document.getElementsByClassName('show')[0]) if (curr_modal) curr_modal.hide()