Thanks W84Soft for that.
Click Save and Exit and wait until you will be back to the main menu.
Reload the page
Save exporter & importer
modIf you want to create your own mod, add javascript file to mods/ folder. Now you must to add install function which must be exported.
Below is an example mod for listening to buttons that open links
export function install(){
const original_open=window.open;
window.open=function(url, target, windowFeatures){
console.log(url,target,windowFeatures);
original_open(url,target,windowFeatures);
}
}
Now you need to modify mods.json, add your new mod to list:
{
"mods":[
// Other mods:
{...},
// Your mod:
{
"name":"Example mod",
"description":"Example description",
"script":"example-script",
"version":"1.0.0"
}
]
}
Now you can start the server, e.g. via NodeJS http-server and run the game: