22
This commit is contained in:
@@ -249,16 +249,12 @@ const de = lang === "de";
|
||||
`${window.location.origin}/styles/global.css`,
|
||||
).then((r) => r.text());
|
||||
} catch (e) {}
|
||||
|
||||
// ── NEU: Alle lokalen Link-Stylesheets fetchen (Astro Component CSS) ──
|
||||
// ── NEU: Astro-generierte CSS-Dateien fetchen ──────────────────
|
||||
const linkedCss = (
|
||||
await Promise.all(
|
||||
Array.from(document.querySelectorAll('link[rel="stylesheet"]'))
|
||||
.map((l) => l.href)
|
||||
.filter(
|
||||
(href) =>
|
||||
href.startsWith(origin) && !href.includes("fonts.googleapis"),
|
||||
)
|
||||
.filter((href) => href.startsWith(origin)) // nur lokale, keine Google Fonts
|
||||
.map((href) =>
|
||||
fetch(href)
|
||||
.then((r) => r.text())
|
||||
@@ -266,7 +262,7 @@ const de = lang === "de";
|
||||
),
|
||||
)
|
||||
).join("\n");
|
||||
|
||||
// ───────────────────────────────────────────────────────────────
|
||||
const inlineStyles = Array.from(document.querySelectorAll("style"))
|
||||
.map((s) => s.textContent)
|
||||
.join("\n");
|
||||
|
||||
@@ -501,15 +501,12 @@ function j(v: any) {
|
||||
).then((r) => r.text());
|
||||
} catch (e) {}
|
||||
|
||||
// ── NEU: Alle lokalen Link-Stylesheets fetchen (Astro Component CSS) ──
|
||||
// ── NEU: Astro-generierte CSS-Dateien fetchen ──────────────────
|
||||
const linkedCss = (
|
||||
await Promise.all(
|
||||
Array.from(document.querySelectorAll('link[rel="stylesheet"]'))
|
||||
.map((l) => l.href)
|
||||
.filter(
|
||||
(href) =>
|
||||
href.startsWith(origin) && !href.includes("fonts.googleapis"),
|
||||
)
|
||||
.filter((href) => href.startsWith(origin)) // nur lokale, keine Google Fonts
|
||||
.map((href) =>
|
||||
fetch(href)
|
||||
.then((r) => r.text())
|
||||
@@ -517,6 +514,7 @@ function j(v: any) {
|
||||
),
|
||||
)
|
||||
).join("\n");
|
||||
// ───────────────────────────────────────────────────────────────
|
||||
|
||||
const inlineStyles = Array.from(document.querySelectorAll("style"))
|
||||
.map((s) => s.textContent)
|
||||
|
||||
Reference in New Issue
Block a user