const myModals = Array.from(document.querySelectorAll('.modal'))
myModals.forEach(modal => {
modal.addEventListener('show.bs.modal', function (event) {
window.location.hash = event.target.id
})
modal.addEventListener('hide.bs.modal', function (event) {
history.replaceState(null, null, ' ');
})
})