mirror of
https://gitdab.com/cadence/breezewiki.git
synced 2026-03-05 13:40:27 -05:00
Update appearance of external links
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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]";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user