main^2
Midnight 2 years ago
parent 0d72e0d608
commit f894d80c22

@ -23,10 +23,12 @@
$: number = commissions.length + 1;
async function setup() {
let prefill = true;
const urlParams = new URLSearchParams(window.location.search);
urlParams.forEach((value, key) => {
if(key == "commissions") {
try {
prefill = false;
commissions = JSON.parse(value);
commissions.forEach(value => {
types.forEach(element => {
@ -42,12 +44,12 @@
console.log(value.example);
});
} catch(msg) {
commissions = [];
prefill = true;
error = "The selected preset link failed to load. It may be from an old version of the commission picker. It has been replaced with the default preset below."
}
}
});
if(commissions.length == 0) {
if(prefill) {
base();
}
}

Loading…
Cancel
Save