mirror of
https://git.leinelab.org/Mal/mr-crocs-adventures.git
synced 2026-03-17 21:02:23 +01:00
Tilorswift prevents unintentional window closings
This commit is contained in:
@@ -6,6 +6,13 @@ import Setting from "../../js/Setting.js";
|
||||
|
||||
const imageLoader = new ImageLoader();
|
||||
|
||||
window.addEventListener(
|
||||
'beforeunload',
|
||||
(event) => {
|
||||
event.preventDefault();
|
||||
}
|
||||
);
|
||||
|
||||
for (const graphicSet of GraphicSet) {
|
||||
imageLoader.addImage('../' + Setting.TILESET_LOCATION + graphicSet.tileset);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user