same as last commit

master
Aevann 2023-08-03 13:46:00 +03:00
parent 6022699118
commit 30ec96be0d
1 changed files with 4 additions and 5 deletions

View File

@ -598,11 +598,10 @@ if (screen_width <= 768) {
}, 100);
});
window.addEventListener('hashchange', (e) => {
if (e.oldURL.includes('#m-')) {
const modal_id = e.oldURL.split('#m-')[1]
const modal = document.getElementById(modal_id)
bootstrap.Modal.getInstance(modal).hide()
window.addEventListener('hashchange', () => {
if (!location.hash.startsWith("#m-")) {
const curr_modal = bootstrap.Modal.getInstance(document.getElementsByClassName('show')[0])
if (curr_modal) curr_modal.hide()
}
});
}