From 762d5a5114103e0935c75d17cdf69c242244b112 Mon Sep 17 00:00:00 2001 From: dm5wk Date: Sun, 26 May 2024 17:05:45 +0200 Subject: [PATCH] download buttons for yml plans --- band-plan.html | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/band-plan.html b/band-plan.html index 2ba9e3d..5da497f 100644 --- a/band-plan.html +++ b/band-plan.html @@ -72,10 +72,13 @@ div>label { }); update_plan(); - document.getElementById("base_plan").addEventListener("keydown", (event) => { - if (event.key === 'Enter') { - update_plan() - } + ["base", "extension"].forEach((id) => { + create_element_link(document.getElementById("download_" + id), document.getElementById(id + "_plan").value); + document.getElementById("download_" + id).addEventListener("keydown", (event) => { + if (event.key === 'Enter') { + update_plan() + } + }); }); create_element_link(document.getElementById("create_link"), function() { @@ -316,6 +319,8 @@ div>label {
+ +