v1.5.30 - fetch local files to speed up

This commit is contained in:
Azgaar 2021-02-14 19:05:03 +03:00
parent 0fcb4eea0b
commit 3abcd21f49
143 changed files with 3017 additions and 888 deletions

View file

@ -967,7 +967,7 @@
return fetchedCharges.join("");
}
const url = PRODUCTION ? "https://azgaar.github.io/Armoria/charges/" : "http://armoria.herokuapp.com/charges/";
const url = PRODUCTION ? "./charges/" : "http://armoria.herokuapp.com/charges/"; // on local machine fetch files from server
async function fetchCharge(charge, id) {
const fetched = fetch(url + charge + ".svg").then(res => {
if (res.ok) return res.text();