From 39d1ff0d9e360b3bd64c23438c0a11745545f318 Mon Sep 17 00:00:00 2001 From: dm5wk Date: Sun, 26 May 2024 12:50:29 +0200 Subject: [PATCH] plan selection possible via uri parameter --- band-plan.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/band-plan.html b/band-plan.html index 16b472e..1041f3a 100644 --- a/band-plan.html +++ b/band-plan.html @@ -35,6 +35,16 @@ div#togglebuttons>button { const path = require('https://unpkg.com/path-browserify/index.js'); document.addEventListener('DOMContentLoaded', () => { + location.search.substr(1).split("&").forEach((param) => { + let p = param.split("="); + let key = p[0]; + if (key === "base") { + document.getElementById("base_plan").value = decodeURIComponent(p[1]); + } + if (key === "add") { + document.getElementById("additions_plan").value = decodeURIComponent(p[1]); + } + }); update_plan(); document.getElementById("base_plan").addEventListener("keydown", (event) => {