From d8a7b60ba79bb29d89b749b196940b58c220cdb5 Mon Sep 17 00:00:00 2001 From: Stefan Koelle Date: Mon, 17 Aug 2026 13:31:22 +0200 Subject: [PATCH] link replacer on excerpt --- static/js/link-status.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/static/js/link-status.js b/static/js/link-status.js index 5897030..7de0f11 100644 --- a/static/js/link-status.js +++ b/static/js/link-status.js @@ -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) {