3
1
Back

$host->add_hook($host::HOOK_RENDER_ARTICLE_CDM, $this); // $host->add_hook($host::HOOK_ARTICLE_FILTER, $this); // Joy of Tech elseif (strpos($article['link'], 'girlswithslingshots.com/comic/') !== FALSE) { //noop elseif (strpos($article['content'], 'www.asofterworld.com/index.php?id') !== FALSE) { elseif (strpos($article['link'], 'gunnerkrigg.com/?p') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//figure[@class='photo-hires-item']//img", $article); } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users 1e6cc98f41 Various updates, additions Updated LICD, alter alt-textify to handle both title and alt tags elseif (strpos($article['link'], 'twolumps.net/d/') !== FALSE) { $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; } } // Three Panel Soul elseif (strpos($article['link'], 'amultiverse.com/comic/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); // $article['content'] = $this->get_img_tags($xpath, "//div[@id='comicbody']//img", $article); } // Invisible Bread (make the bread visible) elseif (strpos($article['content'], 'imgs.xkcd.com/comics/') !== FALSE) { // Two Lumps elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { // Doghouse Diaries, which has broken alt tags foreach($imgs as $img){ $article['content'] .= "

$orig_content

"; //also append the blarg post because that's small, interesting, $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry){ $article['content'] .= "

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

"; // Wondermark (alt tag already present foreach($imgs as $img){ if ($img->getAttribute('title')) { $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; } } Invisible Bread, Softer World (alt tags), Dinosaur Comics (alt tags+blog), CAD, attempt at OOTS (but that one fails due to referer checks elseif (strpos($article['link'], 'dilbert.com/strip/') !== FALSE) { // elseif (strpos($article["link"], "explosm.net/comics") !== FALSE) { // 90° base rotation angle to align the indentations with.

New Pull Request