From b78f6b22b7b3e076644946e038f3e59465f98632 Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 7 Jun 2023 09:53:41 +0300 Subject: [PATCH] remove #modal --- files/assets/js/core.js | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/files/assets/js/core.js b/files/assets/js/core.js index fd70d51aa..f4ef732c3 100644 --- a/files/assets/js/core.js +++ b/files/assets/js/core.js @@ -600,30 +600,6 @@ function handleUploadProgress(e, upload_prog) { } } - -if (width <= 768) { - if (expandImageModal) { - expandImageModal.addEventListener('show.bs.modal', function () { - setTimeout(() => { - location.hash = "modal"; - }, 800); - }); - - expandImageModal.addEventListener('hide.bs.modal', function () { - if(location.hash == "#modal") { - history.back(); - } - }); - } - - window.addEventListener('hashchange', function () { - if(location.hash != "#modal") { - const curr_modal = bootstrap.Modal.getInstance(document.getElementsByClassName('show')[0]) - if (curr_modal) curr_modal.hide() - } - }); -} - document.querySelectorAll('form').forEach(form => { form.addEventListener('submit', (e) => { if (form.classList.contains('is-submitting')) {