1 Commits

Author SHA1 Message Date
0d369c4c1e Add calculator form to new tab
Some checks failed
Continuous Deployment / lint (push) Successful in 29s
Continuous Deployment / deploy-chrome (push) Failing after 17s
Continuous Deployment / deploy-firefox (push) Successful in 3m22s
2025-11-29 12:31:00 +01:00
5 changed files with 27 additions and 5 deletions

View File

@@ -1,5 +1,9 @@
# Changelog
## 1.11.3 (2026-11-21)
- ajout du calculateur de trajet vers un nouvel onglet
## 1.11.2 (2026-11-28)
- correction du bug sur les multiples attaques avec comte

1
images/blank.svg Normal file
View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Free v7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path fill="#000000" d="M416.5 88L416.5 160L352.5 160C273 160 208.5 224.5 208.5 304C208.5 397.4 291.3 438.8 309.1 446.6C311.3 447.6 313.7 448 316.2 448L318.7 448C328.5 448 336.5 440 336.5 430.2C336.5 421.9 330.6 414.7 323.7 409.9C314.8 403.7 304.5 391.7 304.5 369.4C304.5 324.4 341 287.9 386 287.9L416.5 287.9L416.5 359.9C416.5 369.6 422.3 378.4 431.3 382.1C440.3 385.8 450.6 383.8 457.5 376.9L593.5 240.9C602.9 231.5 602.9 216.3 593.5 207L457.5 71C450.6 64.1 440.3 62.1 431.3 65.8C422.3 69.5 416.5 78.3 416.5 88zM144.5 160C100.3 160 64.5 195.8 64.5 240L64.5 496C64.5 540.2 100.3 576 144.5 576L400.5 576C444.7 576 480.5 540.2 480.5 496L480.5 464C480.5 446.3 466.2 432 448.5 432C430.8 432 416.5 446.3 416.5 464L416.5 496C416.5 504.8 409.3 512 400.5 512L144.5 512C135.7 512 128.5 504.8 128.5 496L128.5 240C128.5 231.2 135.7 224 144.5 224L160.5 224C178.2 224 192.5 209.7 192.5 192C192.5 174.3 178.2 160 160.5 160L144.5 160z"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

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

View File

@@ -5,8 +5,8 @@
"firefox"
],
"release_notes": {
"fr": "- correction du bug sur les multiples attaques avec comte\n- correction du bug sur le bouton pour sélectionner toutes les troupes\n- correction du bug sur l'envoi de ressources vers un village cible\n- ajout des ids dans la liste des joueurs d'une alliance\n- ajout de l'id sur le profil d'un joueur",
"en-US": "- fix bug on multiple attacks with snob\n- fix bug on button for selecting all units\n- fix bug on sending resources to a target village\n- add player id in other ally member list\n- add id on player profile"
"fr": "- ajout du calculateur de trajet vers un nouvel onglet",
"en-US": "- add travel calculator in new tab"
}
}
}

View File

@@ -463,7 +463,7 @@ function showSecondsAndCalculator() {
let table = contentPane.getElementsByClassName("borderlist")[0];
let rows = table.getElementsByTagName("tr");
let headCell = createCustomElement("th");
let headCell = createCustomElement("th", null, "Calcul");
rows[0].appendChild(headCell);
for (let i = 1; i < rows.length; i ++) {
@@ -480,7 +480,16 @@ function showSecondsAndCalculator() {
let targetPoint = searchPoint(cells[1].textContent);
let calculatorCell = createCustomElement("td");
let calculatorForm = createCustomElement(
"form", {"method": "post", "action": "/?s=tools&m=runtime_calculator&inta=calculate"}
"form",
{
"method": "post",
"action": "/?s=tools&m=runtime_calculator&inta=calculate",
"title": "Calculateur de trajet",
},
null,
{
"display": "inline-block",
},
);
calculatorForm.appendChild(createCustomInput("hidden", "start_x", startPoint.x));
calculatorForm.appendChild(createCustomInput("hidden", "start_y", startPoint.y));
@@ -495,6 +504,14 @@ function showSecondsAndCalculator() {
);
calculatorForm.appendChild(calculatorImg);
calculatorCell.appendChild(calculatorForm);
let calculatorFormBlank = calculatorForm.cloneNode(true);
calculatorFormBlank.setAttribute("target", "_blank");
calculatorFormBlank.setAttribute("title", "Calculateur de trajet dans nouvel onglet");
let calculatorBlankImg = calculatorFormBlank.getElementsByTagName("input")[4]
calculatorBlankImg.setAttribute("src", chrome.runtime.getURL("images/blank.svg"));
calculatorCell.appendChild(calculatorFormBlank);
rows[i].appendChild(calculatorCell);
}
}