From 3dd67d776b66f6cdd0c689a6c74c99741500c103 Mon Sep 17 00:00:00 2001 From: samuel Date: Sun, 7 Dec 2025 14:12:20 +0100 Subject: [PATCH] Fix bug non found villages --- CHANGELOG.md | 6 +++++- manifest.json | 2 +- metadata.json | 4 ++-- src/kaplus.js | 6 ++---- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3de4e5b..9f701e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/manifest.json b/manifest.json index f5fe469..1a05394 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "KAplus", - "version": "1.12.1", + "version": "1.12.2", "developer": { "name": "Samuel Campos", diff --git a/metadata.json b/metadata.json index 0e806ca..6f43f9e 100644 --- a/metadata.json +++ b/metadata.json @@ -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" } } } \ No newline at end of file diff --git a/src/kaplus.js b/src/kaplus.js index 187baf2..3c40633 100644 --- a/src/kaplus.js +++ b/src/kaplus.js @@ -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!";