Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2b1eb25a28 | |||
| 2ca48bda23 | |||
| 57d83653d5 | |||
| bc73c51fac |
11
CHANGELOG.md
11
CHANGELOG.md
@@ -1,5 +1,16 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 1.4.3 (2025-09-15)
|
||||||
|
|
||||||
|
- correction de l'affichage du menu en cas de nouveau rapport
|
||||||
|
- utilisation de css pure plutôt que d'une image pour les notifs de messages
|
||||||
|
|
||||||
|
## 1.4.2 (2025-09-14)
|
||||||
|
|
||||||
|
- annulation de la suppression des tours drapeaux (car impossible de réduire l'écran correctement)
|
||||||
|
- correction de l'affichage quand il y a des nouveaux messages et des rapports d'attaques
|
||||||
|
- suppression totale de la bannière de publicité
|
||||||
|
|
||||||
## 1.4.1 (2025-09-02)
|
## 1.4.1 (2025-09-02)
|
||||||
|
|
||||||
- correction de la largeur du menu principal
|
- correction de la largeur du menu principal
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Free v7.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path fill="#ff0000" d="M64 320C64 178.6 178.6 64 320 64C461.4 64 576 178.6 576 320C576 461.4 461.4 576 320 576C178.6 576 64 461.4 64 320z"/></svg>
|
|
||||||
|
Before Width: | Height: | Size: 362 B |
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "KAplus",
|
"name": "KAplus",
|
||||||
"version": "1.4.1",
|
"version": "1.4.3",
|
||||||
|
|
||||||
"author": "Samuel Campos - netoik.io",
|
"author": "Samuel Campos - netoik.io",
|
||||||
"description": "Extension développée pour améliorer l'expérience de jeu KingsAge (fonctionne avec ou sans premium)",
|
"description": "Extension développée pour améliorer l'expérience de jeu KingsAge (fonctionne avec ou sans premium)",
|
||||||
|
|||||||
@@ -1,20 +1,7 @@
|
|||||||
@keyframes blinking {
|
#inner_footer {
|
||||||
0%, 100% {
|
.inner_subcolumns {
|
||||||
opacity: 1;
|
left: 0 !important;
|
||||||
}
|
}
|
||||||
50% {
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width:1000px) {
|
|
||||||
#display_left, #display_right {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#banner_container {
|
|
||||||
display: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#content_wrapper > table {
|
#content_wrapper > table {
|
||||||
@@ -27,12 +14,6 @@
|
|||||||
text-align: center !important;
|
text-align: center !important;
|
||||||
padding: 0 9px 0 11px !important;
|
padding: 0 9px 0 11px !important;
|
||||||
}
|
}
|
||||||
.flag {
|
|
||||||
position: absolute;
|
|
||||||
top: 5px;
|
|
||||||
width: 50px;
|
|
||||||
opacity: 0.7;
|
|
||||||
}
|
|
||||||
.shortcut_container {
|
.shortcut_container {
|
||||||
float: none;
|
float: none;
|
||||||
}
|
}
|
||||||
@@ -42,16 +23,6 @@
|
|||||||
.shortcut_container_right {
|
.shortcut_container_right {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
.shortcut_container_flag {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
}
|
|
||||||
.shortcut_container_flag_left {
|
|
||||||
left: 10px;
|
|
||||||
}
|
|
||||||
.shortcut_container_flag_right {
|
|
||||||
right: 10px;
|
|
||||||
}
|
|
||||||
.shortcut_element {
|
.shortcut_element {
|
||||||
margin: 0 !important;
|
margin: 0 !important;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
@@ -59,9 +30,6 @@
|
|||||||
width: 70px !important;
|
width: 70px !important;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
.shortcut_container_flag .shortcut_element {
|
|
||||||
width: auto !important;
|
|
||||||
}
|
|
||||||
.shortcut_element_left, .shortcut_element_right, .shortcut_element_left_premium, .shortcut_element_right_premium {
|
.shortcut_element_left, .shortcut_element_right, .shortcut_element_left_premium, .shortcut_element_right_premium {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@@ -80,28 +48,18 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
}
|
}
|
||||||
a.no_attack {
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
a.has_attack {
|
|
||||||
.shortcut_element_image {
|
|
||||||
animation: blinking 2s infinite;
|
|
||||||
}
|
|
||||||
.shortcut_element_desc {
|
|
||||||
color: #FFFFFF;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
a:hover, a.has_notif {
|
a:hover, a.has_notif {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
a.has_notif::after {
|
a.has_notif::after {
|
||||||
background-image: url("moz-extension://__MSG_@@extension_id__/images/notif.svg"), url("chrome-extension://__MSG_@@extension_id__/images/notif.svg");
|
|
||||||
background-size: 13px 13px;
|
background-size: 13px 13px;
|
||||||
|
background-color: #FF0000;
|
||||||
|
border-radius: 50%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -13px;
|
top: -13px;
|
||||||
right: -3px;
|
right: 3px;
|
||||||
width: 13px;
|
width: 12px;
|
||||||
height: 13px;
|
height: 12px;
|
||||||
content: "";
|
content: "";
|
||||||
}
|
}
|
||||||
.shortcut_element_image {
|
.shortcut_element_image {
|
||||||
|
|||||||
@@ -30,15 +30,21 @@ function createRow(key, value) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function shortcutElementReplace(elt, img, text) {
|
function shortcutElementReplace(elt, img, text) {
|
||||||
hyperlinkElements = elt.getElementsByTagName("a");
|
imgElements = elt.getElementsByTagName("img");
|
||||||
if (hyperlinkElements.length == 2) {
|
for (i=0; i<imgElements.length; i++) {
|
||||||
hyperlinkElements[0].remove();
|
if (i == 0) {
|
||||||
elt.getElementsByTagName("a")[0].classList.add("has_notif");
|
elt.getElementsByTagName("a")[0].classList.add("has_notif");
|
||||||
|
}
|
||||||
|
imgElements[i].remove();
|
||||||
|
i --;
|
||||||
}
|
}
|
||||||
imageElements = elt.getElementsByTagName("img");
|
|
||||||
if (imageElements.length == 1 && imageElements[0].getAttribute("src").endsWith("new_report.png")) {
|
aElements = elt.getElementsByTagName("a");
|
||||||
imageElements[0].remove();
|
for (i=0; i<aElements.length; i++) {
|
||||||
elt.getElementsByTagName("a")[0].classList.add("has_notif");
|
if (i > 0) {
|
||||||
|
aElements[i].remove();
|
||||||
|
i --;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
spanImageElement = document.createElement("span");
|
spanImageElement = document.createElement("span");
|
||||||
@@ -48,60 +54,22 @@ function shortcutElementReplace(elt, img, text) {
|
|||||||
imgElement.setAttribute("src", chrome.runtime.getURL("images/"+img+".svg"));
|
imgElement.setAttribute("src", chrome.runtime.getURL("images/"+img+".svg"));
|
||||||
spanImageElement.appendChild(imgElement);
|
spanImageElement.appendChild(imgElement);
|
||||||
|
|
||||||
hyperlinkElement = elt.getElementsByTagName("a")[0];
|
aElements[0].textContent = "";
|
||||||
hyperlinkElement.textContent = "";
|
aElements[0].appendChild(spanImageElement);
|
||||||
hyperlinkElement.appendChild(spanImageElement);
|
|
||||||
|
|
||||||
if (text) {
|
if (text) {
|
||||||
spanDescElement = document.createElement("span");
|
spanDescElement = document.createElement("span");
|
||||||
spanDescElement.classList.add("shortcut_element_desc");
|
spanDescElement.classList.add("shortcut_element_desc");
|
||||||
spanDescElement.textContent = text;
|
spanDescElement.textContent = text;
|
||||||
hyperlinkElement.appendChild(spanDescElement);
|
aElements[0].appendChild(spanDescElement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function shortcutElementAddFlag(elt, side) {
|
|
||||||
shortcutContainer = document.createElement("div");
|
|
||||||
shortcutContainer.classList.add("shortcut_container", "shortcut_container_flag", "shortcut_container_flag_"+side);
|
|
||||||
shortcutElement = document.createElement("div");
|
|
||||||
shortcutElement.classList.add("shortcut_element");
|
|
||||||
shortcutElementCenter = document.createElement("span");
|
|
||||||
shortcutElementCenter.classList.add("shortcut_element_center");
|
|
||||||
shortcutElementMarker = document.createElement("span");
|
|
||||||
shortcutElementMarker.classList.add("shortcut_element_marker");
|
|
||||||
|
|
||||||
hyperlink = document.createElement("a");
|
|
||||||
hyperlink.classList.add("no_attack");
|
|
||||||
|
|
||||||
spanImage = document.createElement("span");
|
|
||||||
spanImage.classList.add("shortcut_element_image");
|
|
||||||
image = document.createElement("img");
|
|
||||||
image.setAttribute("src", chrome.runtime.getURL("images/flag.svg"));
|
|
||||||
|
|
||||||
spanDesc = document.createElement("span");
|
|
||||||
spanDesc.classList.add("shortcut_element_desc");
|
|
||||||
|
|
||||||
layTowerAttacks = document.getElementsByClassName("lay_tower_"+side+"_top_attack");
|
|
||||||
if (layTowerAttacks.length == 1) {
|
|
||||||
hyperlink.setAttribute("href", layTowerAttacks[0].getElementsByTagName("a")[0].getAttribute("href"));
|
|
||||||
spanDesc.textContent = layTowerAttacks[0].textContent;
|
|
||||||
hyperlink.classList.add("has_attack");
|
|
||||||
hyperlink.classList.remove("no_attack");
|
|
||||||
}
|
|
||||||
|
|
||||||
spanImage.appendChild(image);
|
|
||||||
hyperlink.appendChild(spanImage);
|
|
||||||
hyperlink.appendChild(spanDesc);
|
|
||||||
shortcutElementMarker.appendChild(hyperlink);
|
|
||||||
shortcutElementCenter.appendChild(shortcutElementMarker);
|
|
||||||
shortcutElement.appendChild(shortcutElementCenter);
|
|
||||||
shortcutContainer.appendChild(shortcutElement);
|
|
||||||
elt.appendChild(shortcutContainer);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Improve main menu display */
|
/* Improve main menu display */
|
||||||
layCastleTopElements = document.getElementsByClassName("lay_castle_top");
|
layCastleTopElements = document.getElementsByClassName("lay_castle_top");
|
||||||
if (layCastleTopElements.length == 1) {
|
if (layCastleTopElements.length == 1) {
|
||||||
|
document.getElementById("banner_skyscraper").remove();
|
||||||
|
|
||||||
shortcutElements = layCastleTopElements[0].getElementsByClassName("shortcut_element");
|
shortcutElements = layCastleTopElements[0].getElementsByClassName("shortcut_element");
|
||||||
shortcutElementReplace(shortcutElements[0], "ranking", shortcutElements[0].textContent.replace(/[^0-9]/g, ""));
|
shortcutElementReplace(shortcutElements[0], "ranking", shortcutElements[0].textContent.replace(/[^0-9]/g, ""));
|
||||||
shortcutElementReplace(shortcutElements[1], "ally", "");
|
shortcutElementReplace(shortcutElements[1], "ally", "");
|
||||||
@@ -111,10 +79,6 @@ if (layCastleTopElements.length == 1) {
|
|||||||
shortcutElementReplace(shortcutElements[5], "tools", "");
|
shortcutElementReplace(shortcutElements[5], "tools", "");
|
||||||
shortcutElementReplace(shortcutElements[6], "favorites", "");
|
shortcutElementReplace(shortcutElements[6], "favorites", "");
|
||||||
|
|
||||||
shortcutBar = layCastleTopElements[0].getElementsByClassName("shortcut-element")[0];
|
|
||||||
shortcutElementAddFlag(shortcutBar, "left");
|
|
||||||
shortcutElementAddFlag(shortcutBar, "right");
|
|
||||||
|
|
||||||
shortcutContainers = layCastleTopElements[0].getElementsByClassName("shortcut_container");
|
shortcutContainers = layCastleTopElements[0].getElementsByClassName("shortcut_container");
|
||||||
shortcutContainers[0].classList.add("shortcut_container_left");
|
shortcutContainers[0].classList.add("shortcut_container_left");
|
||||||
shortcutContainers[2].classList.add("shortcut_container_right");
|
shortcutContainers[2].classList.add("shortcut_container_right");
|
||||||
|
|||||||
Reference in New Issue
Block a user