Ajout du shader d'ouverture sur la page d'accueil
This commit is contained in:
+6
-8
@@ -1,10 +1,12 @@
|
||||
import { statusProxy } from './main.js'
|
||||
import { getDocumentShaderSource } from './cuteTexture.js';
|
||||
|
||||
export async function loadStatus(){
|
||||
let res = await fetch('/status/index.html');
|
||||
|
||||
let html_text = await res.text()
|
||||
let html = new DOMParser().parseFromString(html_text, "text/html");
|
||||
|
||||
let shaderSource = getDocumentShaderSource(html);
|
||||
|
||||
let target = document.querySelector('#statuSection');
|
||||
|
||||
@@ -15,13 +17,7 @@ export async function loadStatus(){
|
||||
let status = html.querySelector('#lolStatus');
|
||||
console.log('current status:', status.innerText);
|
||||
|
||||
|
||||
if (status.innerText.includes('ouvert')){
|
||||
statusProxy.lolStatus = true;
|
||||
}else{
|
||||
statusProxy.lolStatus = false;
|
||||
}
|
||||
|
||||
let isOpen = status.innerText.includes('ouvert');
|
||||
|
||||
let icon = html.querySelector('link[rel="icon"]');
|
||||
let style = html.querySelectorAll('link[rel="stylesheet"]')[0];
|
||||
@@ -31,4 +27,6 @@ export async function loadStatus(){
|
||||
document.head.append(style);
|
||||
|
||||
target.appendChild(status);
|
||||
|
||||
return { open: isOpen, shaderSource };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user