plan selection possible via uri parameter
This commit is contained in:
parent
c142be9e4a
commit
39d1ff0d9e
|
@ -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) => {
|
||||
|
|
Loading…
Reference in a new issue