3
1
Back

Bread elseif (strpos($article['link'], 'https://web3isgoinggreat.com/single/') !== FALSE) { // Eat That Toast bog-standard example // Penny Arcade if (strpos($article["link"], "penny-arcade.com") !== FALSE && strpos($article["title"], "Comic:") !== FALSE) { $aftercomic = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } Assorted updates elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//div//img[contains(@src, 'images') and contains(@src, 'png')]", $article); } // Two Lumps elseif (strpos($article['link'], 'questionablecontent') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // there's both alt and title texts, they're both different, use both. $alt_element = $doc->createElement("i", $alt_text); $para_element->appendChild($alt_element); $para_element->appendChild($doc->createElement("br")); $title_element = $doc->createElement("i", $alt_text); } elseif (strpos($article["link"], "manicpixienightmaregirls.com/") !== FALSE) { // XKCD (alt tags we don't need to call out for) elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE ) { // Cyanide & Happiness elseif (strpos($article['link'], 'cad-comic.com/cad/') !== FALSE) { $aftercomic = $this->get_img_tags($xpath, '(//div[@class="container"]//center//img)', $article); } } /* dirty absolute URL is ready! */ elseif (strpos(strtolower($article['link']), 'giantitp.com/comics/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // $article['content'] = $this->get_img_tags($xpath, "//div[@class='singleImage']/img[@class='magicfields']", $article); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comicbody']//img", $article); $article['content'] .= "

" . $entry->textContent . "

"; } } } //noop elseif (strpos($article['content'], 'thedoghousediaries.com/dhdcomics/') !== FALSE){ //also get the blog //also get the blog $entries = $xpath->query("//div[@id='signoff-wrapper']"); foreach ($entries as $entry){ $article['content'] .= "

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

"; } } // } elseif (strpos($alt_text, $title_text) !== false){ $text_element = $doc->createElement("i", $title_text); $para_element->appendChild($title_element); } $img->parentNode->replaceChild($new_element, $img); } function init($host) { /** * Use this if you want wider holes for the setscrew hole in the Source Code Form to which such Contribution(s) was submitted. If You distribute must include a readable copy of https://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions.

New Pull Request