23 lines
650 B
JavaScript
23 lines
650 B
JavaScript
export async function loadStatus(){
|
|
let res = await fetch('/status/index.ouvert.html');
|
|
|
|
let html_text = await res.text()
|
|
let html = new DOMParser().parseFromString(html_text, "text/html");
|
|
|
|
let target = document.querySelector('#statuSection');
|
|
|
|
let hiddenBtn = target.querySelector('a');
|
|
|
|
hiddenBtn.style.visibility = 'collapse';
|
|
|
|
let status = html.querySelector('#lolStatus');
|
|
let icon = html.querySelector('link[rel="icon"]');
|
|
let style = html.querySelectorAll('link[rel="stylesheet"]')[0];
|
|
console.log("selected style : ", style);
|
|
|
|
document.head.append(icon);
|
|
document.head.append(style);
|
|
|
|
target.appendChild(status);
|
|
}
|