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) => {