Skip to content

Commit 78881c3

Browse files
committed
#592 add link label about opening background tab
1 parent e2dcaca commit 78881c3

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

popup/popup.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,4 +293,12 @@ h2 {
293293

294294
h3 {
295295
font-size: 16pt;
296+
}
297+
298+
.link-visited {
299+
color: #d2691e !important;
300+
}
301+
span.link-visited {
302+
font-weight: bold;
303+
font-size: 0.8em;
296304
}

popup/popup.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function formatAll(txt) {
6969
)
7070
.replace(
7171
/\{AcompatCheck\}/g,
72-
"<a href='https://addons.thunderbird.net/thunderbird/addon/addon-info-sync-compatibility' class='native'>"
72+
"<a href='https://addons.thunderbird.net/thunderbird/addon/addon-compatibility-check/' class='native'>"
7373
)
7474
.replace(/\{P2\}/g, "</p>")
7575
.replace(/\{A2\}/g, "</a>")
@@ -268,6 +268,15 @@ async function updateActions() {
268268
if (link) {
269269
event.preventDefault();
270270
browser.tabs.create({ url: link.href });
271+
link.classList.add("link-visited"); // [issue 592]
272+
// Find or create the status span next to the link
273+
let status = link.nextElementSibling;
274+
if (!status || !status.classList.contains("link-visited")) {
275+
status = document.createElement("span");
276+
status.className = "link-visited";
277+
link.parentNode.insertBefore(status, link.nextSibling);
278+
}
279+
status.textContent = " " + messenger.i18n.getMessage("message.linkInTab");
271280
}
272281
});
273282

0 commit comments

Comments
 (0)