From: Andrew Dolgov Date: Fri, 22 Aug 2014 11:49:20 +0000 (+0400) Subject: af_elreg: remove ads X-Git-Tag: 1.14~15 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=2242bb38d2e5a23e01973d079c42cc63484aeb8e;p=tt-rss.git af_elreg: remove ads --- diff --git a/plugins/af_elreg/init.php b/plugins/af_elreg/init.php index a652d25d..c8d5516e 100644 --- a/plugins/af_elreg/init.php +++ b/plugins/af_elreg/init.php @@ -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) {