af_elreg: remove ads

This commit is contained in:
Andrew Dolgov 2014-08-22 15:49:20 +04:00
parent 35dfbdc573
commit 2242bb38d2
1 changed files with 8 additions and 0 deletions

View 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) {