3
1
Back

"//div[@id='comic']/img", $article); elseif (strpos($article['link'], 'alicegrove.com') !== FALSE) { // $xpath = $this->get_xpath_dealie($article['link']); $orig_content = strip_tags($article['content']); $article['content'] = $this->get_img_tags($xpath, "//img[contains(@src, 'sp') and contains(@src, 'comics')]", $article); } Clean up code formatting; added a few comics; standardized appending alt/title text under images (extra useful for non-browser users) Clean up code formatting; added a few comics; standardized appending alt/title text Added The Trenches; yet more code style tweaking elseif (strpos($article["link"], "eatthattoast.com/comic/") !== FALSE ) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//img[starts-with(@src, 'sp') and contains(@src, 'comics')]", $article); } // Two Lumps // Breaking Cat News elseif (strpos($article['link'], 'somethingpositive.net') !== FALSE) { $article['content'] .= $aftercomic; } } return $article; } if(ADD_IDS){ $article['content'] .= "
Alt: $alt_text
"; } } } module pot_wh148() { module label(string, size=4, halign="center") { color([1,0,0]) linear_extrude(thickness+1) text(string, size, halign=halign, font=font); // draw panel, subtract holes union() { shape(fsh, cird+cdp*smt/100, cord, cfn*4, chg); module shape(hsh, ird, ord, fn4, hg x0= 0; x1 = hsh > 0 ? Ord : ird; y0=-0.1; y1=0; y2=abs(hsh); y3=hg-abs(hsh); y4=hg; y5=hg+0.1; if ( hsh >= 0 ) { // CTRL+ALT+DEL // CTRL+ALT+DEL elseif (strpos($article['link'], '//theoatmeal.com/comics/') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'ENG_')]", $article); $article['content'] = $this->get_img_tags($xpath, "//p[@id='comic_body']//img", $article); } // Girls with Slingshots // CTRL+ALT+DEL Sillies // Two Lumps elseif (strpos($article['link'], 'campcomic.com/comic/') !== FALSE) { $article['content'] = $this->get_img_tags($xpath, "//div[@class='comicpage']//img[contains(@src, 'uploads')]", $article); elseif (strpos($article["link"], "sorcery101.net/the-city-between/thebettertofindyouwith") !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } Invisible Bread, Softer World (alt tags), Dinosaur Comics Cleanup $entries = $xpath->query("//div[@class='entry']"); if (preg_match("@.*(.*)@", $article['content'], $matches)) { $img = preg_replace("@width=\"\d+\"@", "", $img); $img = preg_replace("@height=\"\d+\"@", "", $img); $img = preg_replace("@width=\"\d+\"@", "", $img); $img = preg_replace("@height=\"\d+\"@", "", $img); $img = preg_replace("@width=\"\d+\"@", "", $img); $article['content'] = $this->get_img_tags($xpath, '(//img[@id="main-comic"])', $article); } // Joy of Tech elseif (strpos($article['link'], 'wondermark.com/c') !== FALSE) { //No matches if ($img->getAttribute('title')) { $article['content'] = $this->get_img_tags($xpath, '//p[@class="Maintext"]//img[contains(@src, "joyimages")]', $article); } // Joy of Tech $xpath .

New Pull Request