Add preload and scripts
This commit is contained in:
parent
ad9474a6e9
commit
47ee508ae5
6 changed files with 1146 additions and 0 deletions
14
shell.html
14
shell.html
|
@ -172,6 +172,20 @@
|
|||
window.onerror = function() {
|
||||
alert("An error occured!")
|
||||
};
|
||||
|
||||
window.fileLoadedAsync = function(file) {
|
||||
if (!(/.*Map.*rxdata/i.test(file))) return;
|
||||
|
||||
fetch('preload/' + file + '.json')
|
||||
.then(function(response) {
|
||||
return response.json();
|
||||
})
|
||||
.then(function(jsonResponse) {
|
||||
jsonResponse.forEach((f) => {
|
||||
fetch('gameasync/' + f).then().catch();
|
||||
});
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
{{{ SCRIPT }}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue