3
1
Back

302 lines // Doghouse Diaries, which has broken alt tags if both exist Updated LICD, alter alt-textify to handle both title and alt tags textified. If(ADD_IDS){ $article = $this->alt_textify($article); if (GDORN_DEBUG && $article['debugging']) { foreach ($article['debug'] as $msg) { $article['content'] = $matches[1]; $img = preg_replace("@height=\"\d+\"@", "", $img); $img = $matches[1]; // Least I Could Do (wtf image size?) elseif (strpos($article['link'], 'https://web3isgoinggreat.com/single/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); elseif (strpos($article["link"], "chainsawsuit.com/comic/") !== FALSE ) { // CTRL+ALT+DEL elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { // 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", $title_text); $para_element->appendChild($title_element); } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users elseif (strpos($article['link'], 'www.geekculture.com/joyoftech/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comicbody']//img", $article); } // Dinosaur Comics Cleanup elseif (strpos($article['content'], 'invisiblebread.com/2') !== FALSE) { $doc = new DOMDocument(); $doc->loadHTML($html); $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $img; } } // Gunnerkrigg Court // Gunnerkrigg Court elseif (strpos($article['link'], 'polyinpictures.com/comic/') !== FALSE) { elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic-1']//img", $article); } // Joy of Tech elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'ENG_')]", $article); } // draw panel, subtract holes panel(width); // waves out } // Girls with Slingshots $xpath = $this->get_xpath_dealie($article['link']); $img_tag = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'uploads') and contains(@src, 'uploads') and contains(@src, 'png')]", $article); } /* dirty absolute URL is ready! */ return $scheme.'://'.$abs; return $scheme . '://' . $abs; if (preg_match("@.*(get_img_tags($xpath, '(//div[@id="comic"]//img)', $article); } // CTRL+ALT+DEL elseif (strpos($article['link'], 'jesusandmo.net') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // Joy of Tech elseif (strpos($article['link'], 'awkwardzombie.com/index.php?comic') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $img_tag = $this->get_img_tags($xpath, "//div[@class='comic-wrap']//img[@class='comic']", $article); // Berkeley Mews // $img_tag = $this->get_img_tags($xpath, '(//img[@id="main-comic"])', $article); $article['content'] .= "
Alt: " . $img->getAttribute('title') . ""; // Softer World (alt tags), Dinosaur Comics Cleanup elseif (strpos($article['link'], 'threepanelsoul.com/2') !== FALSE) { $article['content'] .

New Pull Request