3 Commits

Author SHA1 Message Date
2b1eb25a28 Add Makefile 2025-09-15 11:00:47 +02:00
2ca48bda23 Change notif point from image to css background 2025-09-15 10:57:03 +02:00
57d83653d5 Fix messages with notifs in menu 2025-09-15 10:56:29 +02:00
5 changed files with 23 additions and 11 deletions

View File

@@ -1,5 +1,10 @@
# 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)

View File

@@ -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

View File

@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "KAplus",
"version": "1.4.2",
"version": "1.4.3",
"author": "Samuel Campos - netoik.io",
"description": "Extension développée pour améliorer l'expérience de jeu KingsAge (fonctionne avec ou sans premium)",

View File

@@ -52,13 +52,14 @@
opacity: 1;
}
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-color: #FF0000;
border-radius: 50%;
position: absolute;
top: -13px;
right: -3px;
width: 13px;
height: 13px;
right: 3px;
width: 12px;
height: 12px;
content: "";
}
.shortcut_element_image {

View File

@@ -30,7 +30,7 @@ function createRow(key, value) {
}
function shortcutElementReplace(elt, img, text) {
imgElements = elt.getElementsByTagName("img")
imgElements = elt.getElementsByTagName("img");
for (i=0; i<imgElements.length; i++) {
if (i == 0) {
elt.getElementsByTagName("a")[0].classList.add("has_notif");
@@ -39,6 +39,14 @@ function shortcutElementReplace(elt, img, text) {
i --;
}
aElements = elt.getElementsByTagName("a");
for (i=0; i<aElements.length; i++) {
if (i > 0) {
aElements[i].remove();
i --;
}
}
spanImageElement = document.createElement("span");
spanImageElement.classList.add("shortcut_element_image");
@@ -46,15 +54,14 @@ function shortcutElementReplace(elt, img, text) {
imgElement.setAttribute("src", chrome.runtime.getURL("images/"+img+".svg"));
spanImageElement.appendChild(imgElement);
hyperlinkElement = elt.getElementsByTagName("a")[0];
hyperlinkElement.textContent = "";
hyperlinkElement.appendChild(spanImageElement);
aElements[0].textContent = "";
aElements[0].appendChild(spanImageElement);
if (text) {
spanDescElement = document.createElement("span");
spanDescElement.classList.add("shortcut_element_desc");
spanDescElement.textContent = text;
hyperlinkElement.appendChild(spanDescElement);
aElements[0].appendChild(spanDescElement);
}
}