3
1
Back

$article); Invisible Bread, Softer World (alt tags we don't need to call out for) elseif (strpos($article['content'], 'wondermark.com/c') !== FALSE) { elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { // CTRL+ALT+DEL Sillies elseif (strpos($article['link'], 'breakingcatnews.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'Strip')]", $article); } elseif (strpos($alt_text, $title_text) !== false){ $text_element = $doc->createElement("i", $title_text); $para_element->appendChild($title_element); } Clean up code formatting; added a few more 'simple' Unseen Servant functions 6f5ee76aea tracks the ratsnest and compactifies the power 2 From 057198b8de00d90dc9311b86f496b649dca09ec0 Mon Sep 17 00:00:00 2001 Subject: [PATCH] More cleanup // $host->add_hook($host::HOOK_ARTICLE_FILTER, $this); $host->add_hook($host::HOOK_RENDER_ARTICLE_CDM, $this); $host->add_hook($host::HOOK_RENDER_ARTICLE, $this); } Some comics supported elseif (strpos($article['link'], 'questionablecontent') !== FALSE) { // Camp Weedonwantcha elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, '//td/img[contains(@src, "/comics/images/")]', $article); // Least I Could Do (wtf image size?) elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { $article['content'] .= "

" . $entry->textContent . "

"; } } $entries = $xpath->query("//div[@id='blarg']/div[last()]"); // Penny Arcade elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { $article['content'] = $doc->saveHTML(); function get_img_tags($xpath, $query, $article) { $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry){ foreach ($entries as $entry) { $article['content'] = $this->get_img_tags($xpath, "//img[@class='comic']", $article); //also get the blog $entries = $xpath->query("//div[@id='signoff-wrapper']"); $rel = trim($rel); if (parse_url($rel, PHP_URL_SCHEME) != '' || substr($rel, 0, 2) == '//') { if (preg_match("@.*?(.*)@", $article['content'], $matches)) { // Eat That Toast bog-standard example // Penny Arcade if (strpos($article['link'], 'eatthattoast.com/comic/') !== FALSE) { $article['content'] .= "

" . $entry->ownerDocument->saveXML($entry) . "

"; } } return $article; } function api_version() { return $this->mangle_article($article); } function get_xpath_dealie($link) { $abs = preg_replace($re, '/', $abs, -1, $n)) {} /* absolute URL is ready! */ return $scheme . '://' . $abs; if (preg_match("@.*( New Pull Request