From 0816ca981208664427331f59c7e5999473f8dc6e Mon Sep 17 00:00:00 2001 From: sa6anw Date: Sat, 19 Jul 2025 07:44:49 +0000 Subject: [PATCH] midsomer --- docs/midsomer.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/midsomer.md b/docs/midsomer.md index 81c2c4e..2147b6e 100644 --- a/docs/midsomer.md +++ b/docs/midsomer.md @@ -124,8 +124,17 @@ Whether you're a licensed ham or just a loyal viewer, add your name and help us document.addEventListener("DOMContentLoaded", () => { const iframe = document.getElementById("namninsamling-lista"); if (iframe) { - const now = Date.now(); // eller new Date().getTime() - iframe.src = `/data/namnlista.html?t=${now}`; + const timestamp = Date.now(); + iframe.src = `/data/namnlista.html?t=${timestamp}`; + + iframe.onload = () => { + try { + const contentHeight = iframe.contentWindow.document.body.scrollHeight; + iframe.style.height = contentHeight + "px"; + } catch (e) { + console.warn("Kunde inte mäta höjden på iframen:", e); + } + }; } }); @@ -134,7 +143,8 @@ Whether you're a licensed ham or just a loyal viewer, add your name and help us