From 6ae440cbf1eb26f42decfd628886cfb82a5c47b3 Mon Sep 17 00:00:00 2001 From: Quentin Rouiller Date: Mon, 20 Apr 2026 09:00:00 +0200 Subject: [PATCH] =?UTF-8?q?Version=205.0.0=20=E2=80=94=20Refonte=20topbar?= =?UTF-8?q?=20(horloge,=20menu=20admin)=20-=20initAppClock=20:=20horloge?= =?UTF-8?q?=20HH:MM=20au=20milieu=20topbar=20-=20initAdminMenu=20:=20menu?= =?UTF-8?q?=20admin=20cach=C3=A9=20(5=20clics=20sur=20titre)=20-=20initSes?= =?UTF-8?q?sionTimer=20:=20compteur=20de=20session=20EV=20(tick=201s)=20[c?= =?UTF-8?q?ode=20interpol=C3=A9=20entre=20v4.3.0=20et=20v5.0.9]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- background.js | 35 +- manifest.json | 2 +- viewer.css | 16 +- viewer.html | 2 +- viewer.js | 958 +++++++++++++++++++++++++++++++++++++++++++++++--- 5 files changed, 951 insertions(+), 62 deletions(-) diff --git a/background.js b/background.js index 86e6345..1fa9aa3 100644 --- a/background.js +++ b/background.js @@ -85,7 +85,7 @@ async function fetchPlanningXml(origin, phpsessid, unixDate) { `&day_start_hour=8` + `&day_end_hour=19`; console.log("[bg] fetchPlanningXml →", url.substring(0, 140)); - const r = await fetch(url, { credentials: "include" }); + const r = await evFetch(url, origin); console.log("[bg] status =", r.status); if (!r.ok) { // v4.2 : classifier l'erreur HTTP pour que le viewer affiche le bon @@ -100,6 +100,32 @@ async function fetchPlanningXml(origin, phpsessid, unixDate) { return xml; } +/** + * v5.0.9 : wrapper autour de fetch() qui ajoute systématiquement les + * headers de sécurité attendus par EasyVista (Referer, Sec-Fetch-Site, + * X-Requested-With). Sans ces headers, EV renvoie soit un