Update appearance of external links

This commit is contained in:
Cadence Ember
2025-11-10 19:09:24 +13:00
parent c93c901ad3
commit 0524e60d5d
3 changed files with 16 additions and 5 deletions

View File

@@ -65,7 +65,8 @@ async function cont() {
document.getElementById("content").replaceWith(imported)
document.title = xhr.responseXML.title
for (const e of xhr.responseXML.head.children) {
if (["LINK"].includes(e.tagName)) {
const alreadyImported = [...document.querySelectorAll("link[href]")].map(e => e.href)
if (e.tagName === "LINK" && !alreadyImported.includes(e.href)) {
const imported = document.importNode(e, true)
document.head.appendChild(imported)
}

View File

@@ -174,13 +174,13 @@ img {
}
/* indicate wikipedia links */
.extiw::after, .external::after {
svg.external {
vertical-align: super;
content: "[🡕]";
font-family: serif;
font-size: smaller;
}
.extiw[href*="wikipedia.org"]::after {
vertical-align: super;
font-family: serif;
font-size: smaller;
content: "[W]";
}