+ function remove_ad_footer() {
+ // Starting from 2021-02-08, 5ch.net shows an iframe ad
+ // contained in several nested div elements. Dunno which
+ // script is doing it.
+ var iframes = document.querySelectorAll("iframe");
+ for (var iframe of iframes.values()) {
+ if ((iframe.getAttribute("src") || "").startsWith("//stab.thench.net/")) {
+ // Found an iframe to be removed.
+ if (iframe.parentNode && iframe.parentNode.parentNode) {
+ iframe.parentNode.parentNode.remove();
+ }
+ }
+ }
+ }
+
+ // Pop-up windows shown when hovered on >>n links are dynamically
+ // inserted to the DOM. Relink anchors in them as well.
+ let observer = new MutationObserver(relink_all);
+ observer.observe(document.querySelector("body"), {subtree: true, childList: true});
+