Fix bug on attack calculator
Some checks failed
Continuous Deployment / lint (push) Successful in 32s
Continuous Deployment / deploy-chrome (push) Failing after 19s
Continuous Deployment / deploy-firefox (push) Successful in 4m2s

This commit is contained in:
2025-12-03 23:05:38 +01:00
parent 0d369c4c1e
commit 53c2c2e7e3
4 changed files with 16 additions and 6 deletions

View File

@@ -463,10 +463,16 @@ function showSecondsAndCalculator() {
let table = contentPane.getElementsByClassName("borderlist")[0];
let rows = table.getElementsByTagName("tr");
let headCell = createCustomElement("th", null, "Calcul");
rows[0].appendChild(headCell);
let titleRowIndex = 0;
if (rows[titleRowIndex].getElementsByTagName("th").length === 0) {
titleRowIndex = 1;
}
console.log(titleRowIndex)
for (let i = 1; i < rows.length; i ++) {
let headCell = createCustomElement("th", null, "Calcul", {"width": "45px"});
rows[titleRowIndex].appendChild(headCell);
for (let i = titleRowIndex + 1; i < rows.length; i ++) {
let cells = rows[i].getElementsByTagName("td");
let arrivalDateCell = cells[3]
let arrivalTimeCell = cells[4];