dadler / thumbnail-zoom

Thumbnail Zoom Plus is a Firefox plug-in which shows a full-size image pop-up when you hover over a thumbnail or image link. When you hover your mouse over a thumbnail or an image or video link, the add-on displays the full-size image or video still-frame in a floating window. Supported sites include Amazon, Bing, Facebook, Flickr, Google, IMDb, LinkedIn, Netflix, Pinterest, Reddit, Tumblr, Twitter, Yandex.ru, YouTube, Wikipedia, WordPress, Yahoo Images, and many more.
30 stars 7 forks source link

Add support for danbooru powered image boards SUG #97

Open wightwulf1944 opened 11 years ago

wightwulf1944 commented 11 years ago

check these imageboards. They use or are based off of danbooru so they might have the same underlying code.

warning, links are NSFW

http://chan.sankakucomplex.com/ http://danbooru.donmai.us/post http://konachan.com/post

bugmen0t commented 11 years ago

There is a user script for (chan|idol).sankakucomplex.com. It still works but not without issues:

So, the most common case is probably thumbnail.jpg -> resized.jpg e.g.,

// (chan|idol).sankakucomplex.com
// http://c4.sankakustatic.com/data/preview/47/1f/471fefb740c98c9657e7dfc6c0148cbb.jpg becomes
// http://c4.sankakustatic.com/data/sample/47/1f/preview471fefb740c98c9657e7dfc6c0148cbb.jpg
aImageSrc = aImageSrc.replace(new RegExp(
          "(sankakustatic.com/data)/preview" +
          "((/[0-9a-f]{2}){2})" +
          "/([0-9a-f]+" +
          EXTS + ")", "i"),
          "$1/sample$2/preview$4");

GIFs and lowres images need a fallback method to fetch original as there is no resized version.