Correction PDF

This commit is contained in:
2025-09-16 22:20:21 +02:00
parent d9fca86145
commit 41bd8254e7
17 changed files with 591 additions and 110 deletions

View File

@@ -33,13 +33,6 @@
const normalize = (s) => (s ?? "").toString().trim().toLowerCase();
const proxify = (url) => url ? `/HelloFresh/ProxyPdf?url=${encodeURIComponent(url)}` : "";
// Détection iOS (iPhone/iPad et iPadOS mode desktop)
const IS_IOS = /iPad|iPhone|iPod/.test(navigator.userAgent) || (navigator.userAgent.includes("Mac") && "ontouchend" in document);
els.btnOpen?.addEventListener("click", () => {
const r = RECIPES[CUR]; if (!r?.pdf) return;
const u = `/HelloFresh/ProxyPdf?url=${encodeURIComponent(r.pdf)}`;
if (IS_IOS) window.open(u, "_blank", "noopener"); else openViewer();
});