mirror of
https://github.com/welpo/tabi.git
synced 2025-12-14 11:48:45 +01:00
prepend source for accessibility
This commit is contained in:
parent
9dd9492f13
commit
9055b1ad75
2 changed files with 2 additions and 2 deletions
|
|
@ -13,7 +13,7 @@ document.addEventListener("DOMContentLoaded", function() {
|
|||
if (sourceUrl.startsWith('http')) {
|
||||
sourceElement.href = sourceUrl;
|
||||
}
|
||||
codeElement.appendChild(sourceElement);
|
||||
codeElement.prepend(sourceElement);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
2
static/js/addSrcToCodeblock.min.js
vendored
2
static/js/addSrcToCodeblock.min.js
vendored
|
|
@ -1 +1 @@
|
|||
document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".code-source").forEach(function(t){var e,n=t.getAttribute("data-source"),t=t.nextElementSibling;t&&"PRE"===t.tagName&&(t=t.querySelector("code"))&&((e=document.createElement(n.startsWith("http")?"a":"span")).textContent=n,e.className="source-path",n.startsWith("http")&&(e.href=n),t.appendChild(e))})});
|
||||
document.addEventListener("DOMContentLoaded",function(){document.querySelectorAll(".code-source").forEach(function(t){var e,n=t.getAttribute("data-source"),t=t.nextElementSibling;t&&"PRE"===t.tagName&&(t=t.querySelector("code"))&&((e=document.createElement(n.startsWith("http")?"a":"span")).textContent=n,e.className="source-path",n.startsWith("http")&&(e.href=n),t.prepend(e))})});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue