From 2242bb38d2e5a23e01973d079c42cc63484aeb8e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 22 Aug 2014 15:49:20 +0400 Subject: [PATCH] af_elreg: remove ads --- plugins/af_elreg/init.php | 8 ++++++++ 1 file changed, 8 insertions(+) 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) { -- 2.39.5