                history.pushState(history.state, "", appModalLink.href);

                toggleAppModal(previousApp, "hide");
                toggleAppModal(new URL(appModalLink.href).searchParams.get("app"), "show");
            });
        }

        window.addEventListener("popstate", function onPopState() {
            const searchParams = new URLSearchParams(window.location.search);
            const currentApp = searchParams.get("app");

            toggleAppModal(previousApp, 'hide');
            to