diff --git a/src/components/widgets/WelcherAusweisWidget.svelte b/src/components/widgets/WelcherAusweisWidget.svelte index 2552e27c..7d3d6fcc 100644 --- a/src/components/widgets/WelcherAusweisWidget.svelte +++ b/src/components/widgets/WelcherAusweisWidget.svelte @@ -23,6 +23,10 @@ let showVerbrauchsausweis: boolean = false + function postHeight() { + window.parent.postMessage(document.querySelector("html")?.offsetHeight, "*") + } + $: { if (baujahr === "vor 1978") { showVerbrauchsausweis = @@ -36,18 +40,8 @@ allowedTypes.includes(gebaeudetyp) && (leerStand === "bis 30") && (heizungsAlter === ">= 3"); } - // if ((gebaeudetyp || anlass || einheiten || sanierungsstatus || baujahr || heizungsAlter || leerStand) && window.parent) { - // window.parent.postMessage("", "*") - // } } - function sendHeight() { - const height = document.documentElement.scrollHeight; - window.parent.postMessage(height, "https://online-energieausweis.org"); - } - - window.addEventListener("load", sendHeight); - window.addEventListener("resize", sendHeight); @@ -63,6 +57,7 @@ @@ -114,6 +111,7 @@ @@ -138,6 +137,7 @@