Update index.php

This commit is contained in:
James 2022-09-30 08:35:48 +02:00
parent a90457d4ac
commit c1eff35a8f

View File

@ -871,18 +871,16 @@
//Fill the tables
document.getElementById("totalscard").innerHTML = "<table><thead><tr><th>Variable</th><th>Pts</th></tr></thead><tbody>";
$("#totalscard").wrapInner('<table><thead><tr><th>Variable</th><th>Pts</th></tr></thead><tbody id="totalsdata"></tbody></table>');
party_variables.forEach((element, i) => filltable(party_variables_name, element, i));
encounter_variables.forEach((element, i) => filltable(encounter_variables_name, element, i));
//encounter_variables.forEach((element, i) => document.getElementById("totalscard").innerHTML += "<tr>" + encounter_variables_name[i] + "</tr>" + "<tr>" + element + "</tr>");
document.getElementById("totalscard").innerHTML += +"</tbody></table>";
}
function filltable(namespace, element, i) {
$("#totalscard").wrapInner("<tr><td>" + namespace[i] + "</td><td>" + element + "</td></tr>");
$("#totalsdata").wrapInner("<tr><td>" + namespace[i] + "</td><td>" + element + "</td></tr>");
}
function setDiff(difficulty) {