forked from rDrama/rDrama
remove #modal
parent
0cdaf83931
commit
b78f6b22b7
|
@ -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')) {
|
||||
|
|
Loading…
Reference in New Issue