forked from rDrama/rDrama
1
0
Fork 0

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); }, 100);
}); });
window.addEventListener('hashchange', (e) => { window.addEventListener('hashchange', () => {
if (e.oldURL.includes('#m-')) { if (!location.hash.startsWith("#m-")) {
const modal_id = e.oldURL.split('#m-')[1] const curr_modal = bootstrap.Modal.getInstance(document.getElementsByClassName('show')[0])
const modal = document.getElementById(modal_id) if (curr_modal) curr_modal.hide()
bootstrap.Modal.getInstance(modal).hide()
} }
}); });
} }