dont use implicit addEventListener

pull/104/head
Aevann 2023-01-28 12:39:44 +02:00
parent a9f169d3be
commit a8a1af6bea
1 changed files with 3 additions and 3 deletions

View File

@ -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()