suppresion de qq console log et un script inutilisé
This commit is contained in:
+6
-6
@@ -1,7 +1,7 @@
|
||||
export async function loadEvents(){
|
||||
let eventList = document.querySelectorAll('#eventSection > article');
|
||||
//console.log("event list: ", eventList);
|
||||
|
||||
|
||||
for (let event of eventList){
|
||||
let title = event.querySelector('h4');
|
||||
let date = event.querySelector('p.date');
|
||||
@@ -9,14 +9,14 @@ export async function loadEvents(){
|
||||
let posterHTML = await getPoster(posterLink);
|
||||
|
||||
let poster = posterHTML.querySelector('body > article');
|
||||
|
||||
|
||||
let posterStyle = posterHTML.querySelectorAll('head > style:not([data-import="no-import"])')
|
||||
|
||||
console.log('entry data :', title, date, poster, posterStyle);
|
||||
//console.log('entry data :', title, date, poster, posterStyle);
|
||||
|
||||
let selectedEntry = createEntry(title, date, poster, posterStyle)
|
||||
|
||||
console.log('created new details :', selectedEntry);
|
||||
|
||||
//console.log('created new details :', selectedEntry);
|
||||
|
||||
event.replaceChildren(selectedEntry);
|
||||
}
|
||||
@@ -135,6 +135,6 @@ function createEntry(title, date, html, style){
|
||||
for(let el of style){
|
||||
document.head.append(el);
|
||||
}
|
||||
|
||||
|
||||
return newEntry
|
||||
}
|
||||
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
async function importOuverture(){
|
||||
const res = await fetch("/status/index.html")
|
||||
if(!res.ok){
|
||||
throw new Error(`Server responded with status ${res.status} ${res.statusText}`)
|
||||
}
|
||||
let html_text = await res.text()
|
||||
let html = new DOMParser().parseFromString(html_text, "text/html");
|
||||
|
||||
for(let style of html.querySelectorAll("head > style")) {
|
||||
document.head.append(style)
|
||||
}
|
||||
|
||||
let textStatus = html.querySelector("#statusText").textContent;
|
||||
let statusBox = document.querySelector('#statusText');
|
||||
statusBox.textContent = textStatus;
|
||||
}
|
||||
|
||||
importOuverture()
|
||||
|
||||
for( let btn of document.querySelectorAll(".iconBtnStyle")){
|
||||
btn.style.visibility = 'visible';
|
||||
}
|
||||
Reference in New Issue
Block a user