]> git.wh0rd.org - tt-rss.git/blobdiff - plugins/af_elreg/init.php
af_elreg: remove ads
[tt-rss.git] / plugins / af_elreg / init.php
index a652d25d153d59364da8891dcd3a4df30f5d9c25..c8d5516ee27ad4fda73bac0e1b32de0fa54f00a4 100644 (file)
@@ -24,6 +24,14 @@ class Af_ElReg extends Plugin {
                                $basenode = false;
 
                                if ($doc) {
+                                       $xpath = new DOMXPath($doc);
+
+                                       $trash = $xpath->query("//*[@class='wptl top' or @class='wptl btm']");
+
+                                       foreach ($trash as $t) {
+                                               $t->parentNode->removeChild($t);
+                                       }
+
                                        $basenode = $doc->getElementById("body");
 
                                        if ($basenode) {