test on devrama with my fish

pull/176/head
Aevann 2023-08-03 23:59:50 +03:00
parent 59d78141c4
commit 14b1285479
1 changed files with 24 additions and 16 deletions

View File

@ -585,23 +585,31 @@ function handleUploadProgress(e, upload_prog) {
} }
if (screen_width <= 768 && gbrowser != 'iphone') { if (screen_width <= 768) {
addEventListener('hide.bs.modal', function () { let object
if(location.hash == "#modal") { if (gbrowser == 'iphone' && expandImageModal)
history.back(); object = expandImageModal
} if (gbrowser != 'iphone')
}); object = document
addEventListener('shown.bs.modal', function () {
location.hash = "modal";
});
addEventListener('hashchange', function () { if (object) {
if(location.hash != "#modal") { object.addEventListener('hide.bs.modal', function () {
const curr_modal = bootstrap.Modal.getInstance(document.getElementsByClassName('show')[0]) if(location.hash == "#modal") {
if (curr_modal) curr_modal.hide() history.back();
} }
}); });
object.addEventListener('shown.bs.modal', function () {
location.hash = "modal";
});
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 => { document.querySelectorAll('form').forEach(form => {