Core

/client/src/modal.ts (233 B)

1
2
3
4
5
6
7
8
9
export function modalInit() {
document.addEventListener("keydown", (event) => {
if (event.key === "Escape") {
if (document.location.hash.startsWith("#modal-")) {
document.location.hash = "";
}
}
});
}