mirror of
https://github.com/skoelle/buildbroken-blog-archive.git
synced 2026-09-17 18:30:25 +00:00
link replacer on excerpt
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user