From 2f6ea8b387ee4717516cbc96140f58542fbfa30c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 4 Mar 2021 15:09:56 +0300 Subject: split a bunch of plugins into separate repos --- plugins/af_fsckportal/init.php | 44 ------------------------------------------ 1 file changed, 44 deletions(-) delete mode 100644 plugins/af_fsckportal/init.php (limited to 'plugins/af_fsckportal/init.php') diff --git a/plugins/af_fsckportal/init.php b/plugins/af_fsckportal/init.php deleted file mode 100644 index 4e81fde05..000000000 --- a/plugins/af_fsckportal/init.php +++ /dev/null @@ -1,44 +0,0 @@ -host = $host; - - $host->add_hook($host::HOOK_ARTICLE_FILTER, $this); - } - - function hook_article_filter($article) { - - $doc = new DOMDocument(); - - if (@$doc->loadHTML('' . $article["content"])) { - $xpath = new DOMXPath($doc); - $entries = $xpath->query('(//img[@src]|//a[@href])'); - - foreach ($entries as $entry) { - if (preg_match("/feedsportal.com/", $entry->getAttribute("src"))) { - $entry->parentNode->removeChild($entry); - } else if (preg_match("/feedsportal.com/", $entry->getAttribute("href"))) { - $entry->parentNode->removeChild($entry); - } - } - - $article["content"] = $doc->saveHTML(); - } - - return $article; - } - - function api_version() { - return 2; - } - -} -- cgit v1.2.3-54-g00ecf