diff --git a/l4d2web/l4d2web/static/js/modal-router.js b/l4d2web/l4d2web/static/js/modal-router.js index 04a00e7..3107408 100644 --- a/l4d2web/l4d2web/static/js/modal-router.js +++ b/l4d2web/l4d2web/static/js/modal-router.js @@ -69,6 +69,13 @@ dlg.addEventListener("click", (event) => { if (event.target === dlg) dlg.close(); }); + + // Bootstrap: if the page loaded with ?modal= already in the URL + // (refresh, share-link, or browser-history forward), open that modal. + const initialPath = new URL(window.location.href).searchParams.get("modal"); + if (initialPath) { + fetchAndShow(initialPath); + } }); // Browser back/forward: re-evaluate URL state and either fetch+show a new