link replacer on excerpt

This commit is contained in:
2026-08-17 13:31:22 +02:00
parent 78602f6c9b
commit d8a7b60ba7
+4 -2
View File
@@ -30,9 +30,10 @@
return null;
}
var content = document.querySelector(".post-content");
if (!content) return;
var containers = document.querySelectorAll(".post-content, .about-intro, .excerpt");
if (!containers.length) return;
Array.prototype.forEach.call(containers, function (content) {
var links = content.querySelectorAll("a[href^='http']");
Array.prototype.forEach.call(links, function (a) {
var href = a.getAttribute("href");
@@ -55,6 +56,7 @@
if (rep) a.setAttribute("href", rep);
}
});
});
if (dialog) {
dialog.addEventListener("click", function (ev) {