Compare commits
2 Commits
bc73c51fac
...
2ca48bda23
| Author | SHA1 | Date | |
|---|---|---|---|
| 2ca48bda23 | |||
| 57d83653d5 |
@@ -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 |
@@ -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 {
|
||||
|
||||
@@ -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");
|
||||
@@ -38,6 +38,14 @@ function shortcutElementReplace(elt, img, text) {
|
||||
imgElements[i].remove();
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user