Setting config globally

This commit is contained in:
ybouane 2024-10-09 22:33:16 -04:00
parent d5e7af9b87
commit 958d645a98

View file

@ -1,3 +1,4 @@
let config;
document.addEventListener("DOMContentLoaded", async () => {
let $main = document.querySelector('main');
const refreshStatus = async () => {
@ -7,6 +8,7 @@ document.addEventListener("DOMContentLoaded", async () => {
throw new Error(`Error fetching status.json: ${response.statusText}`);
}
const status = await response.json();
config = status.config;
console.log(status);
for (let [siteId, endpointIds] of status.ui) {
let site = status.sites[siteId];