Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8d8ccd8e9d |
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## 1.11.1 (2026-11-24)
|
||||
|
||||
- ajout de l'id des joueurs dans le classement général et la liste des membres de l'alliance
|
||||
|
||||
## 1.10.1 (2026-11-20)
|
||||
|
||||
- envoi des ressources par milliers sur le marché
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"name": "KAplus",
|
||||
"version": "1.10.1",
|
||||
"version": "1.11.1",
|
||||
|
||||
"developer": {
|
||||
"name": "Samuel Campos",
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
"firefox"
|
||||
],
|
||||
"release_notes": {
|
||||
"fr": "- envoi des ressources par milliers sur le marché",
|
||||
"en-US": "- send resources by thousands in market"
|
||||
"fr": "- ajout de l'id des joueurs dans le classement général et la liste des membres de l'alliance",
|
||||
"en-US": "- add players id in ranking and ally members pages"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -27,9 +27,11 @@ function createCustomElement(tag, attrs, text, style) {
|
||||
let elt = document.createElement(tag);
|
||||
if (attrs) {
|
||||
for (let [key, value] of Object.entries(attrs)) {
|
||||
if (value !== null) {
|
||||
elt.setAttribute(key, value.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
if (text) {
|
||||
elt.textContent = text.toString();
|
||||
}
|
||||
@@ -163,6 +165,25 @@ function main() {
|
||||
let sub = urlParams.get("sub");
|
||||
let sendCommandForm = document.getElementById("sendCommandForm");
|
||||
|
||||
/* Add player id on ranking */
|
||||
if (section === "ranking" || (section === "ally" && module === "members")) {
|
||||
let mainContentPane = document.getElementsByClassName("contentpane")[1];
|
||||
let borderListTable = mainContentPane.getElementsByClassName("borderlist")[0];
|
||||
let playerRows = borderListTable.getElementsByTagName("tr");
|
||||
|
||||
let headerCells = playerRows[0].getElementsByTagName("th");
|
||||
let idHeaderCell = createCustomElement("th", {"class": headerCells[0].getAttribute("class")}, "Id");
|
||||
playerRows[0].insertBefore(idHeaderCell, headerCells[1]);
|
||||
|
||||
for (let i = 1; i < playerRows.length; i ++) {
|
||||
let playerCells = playerRows[i].getElementsByTagName("td");
|
||||
let playerProfileLink = playerCells[1].getElementsByTagName("a")[0].getAttribute("href");
|
||||
let idValue = playerProfileLink.replace(/^.*id=(\d+)$/, "$1");
|
||||
let idCell = createCustomElement("td", {"class": playerCells[0].getAttribute("class")}, idValue);
|
||||
playerRows[i].insertBefore(idCell, playerCells[1]);
|
||||
}
|
||||
}
|
||||
|
||||
/* Display unit-points on user profile */
|
||||
if (section === "info_player" && (module === "profile" || module === null)) {
|
||||
let mainContentPane = document.getElementsByClassName("contentpane")[1];
|
||||
|
||||
Reference in New Issue
Block a user