]> git.wh0rd.org Git - tt-rss.git/commitdiff
af_elreg: remove ads
authorAndrew Dolgov <noreply@fakecake.org>
Fri, 22 Aug 2014 11:49:20 +0000 (15:49 +0400)
committerAndrew Dolgov <noreply@fakecake.org>
Fri, 22 Aug 2014 11:49:20 +0000 (15:49 +0400)
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) {