Fix bug non found villages

This commit is contained in:
2025-12-07 14:12:20 +01:00
parent 9bdd5f784f
commit dfed9b714d
4 changed files with 10 additions and 8 deletions

View File

@@ -1,6 +1,10 @@
# Changelog
## 1.12.4 (2026-12-07)
## 1.12.2 (2026-12-07)
- correction du bug sur les villages non trouvés
## 1.12.1 (2026-12-07)
- ajout du planificateur autonome d'attaques

View File

@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "KAplus",
"version": "1.12.1",
"version": "1.12.2",
"developer": {
"name": "Samuel Campos",

View File

@@ -5,8 +5,8 @@
"firefox"
],
"release_notes": {
"fr": "- ajout du planificateur autonome d'attaques",
"en-US": "- add autonomous attack planer"
"fr": "- correction du bug sur les villages non trouvés",
"en-US": "- fix bug non found villages"
}
}
}

View File

@@ -833,10 +833,8 @@ function handleAutoPlanerSubmit(event) {
let doc = parser.parseFromString(xhr.responseText, "text/html");
let mapContainer = doc.getElementById("mapContainer");
let map = mapContainer.getElementsByTagName("table")[1];
let mapRows = map.getElementsByTagName("tr");
let mapRow = mapRows[Math.floor(mapRows.length / 2) - 1];
let mapCells = mapRow.getElementsByTagName("td");
let mapCell = mapCells[Math.floor(mapCells.length / 2) + 1];
let tbody = map.getElementsByTagName("tbody")[0];
let mapCell = tbody.children[6].children[8];
let mapLinks = mapCell.getElementsByTagName("a");
if (mapLinks.length === 0) {
autoPlanerError.textContent = "Opération impossible car le village cible n'existe pas!";