#1866: support for zerochan & minitokyo

redirect to full sizes in respective domains; users still need to register in these sites in order to view *some* posts; those tagged 'ecchi' in zerochan can't be used anonymously
This commit is contained in:
ghostrigger
2014-06-12 09:50:21 +08:00
parent 9aa1f65eb5
commit 61c23c54b4

View File

@@ -318,6 +318,12 @@ class Post < ActiveRecord::Base
when %r{\Ahttp://c(?:s|han|[1-4]).sankakucomplex.com/data(?:/sample)?/(?:[a-f0-9]{2}/){2}(?:sample-|preview)?([a-f0-9]{32})}i
"http://chan.sankakucomplex.com/en/post/show?md5=#{$1}"
when %r{\Ahttp?://s(?:tatic|[1-4]).zerochan.net/.+(?:\.|\/)(\d+)\.(?:jpe?g?)\z}i
"http://www.zerochan.net/#{$1}#full"
when %r{\Ahttp?://static[1-6]?.minitokyo.net/(?:downloads|view)/(?:\d{2}/){2}(\d+)}i
"http://gallery.minitokyo.net/download/#{$1}"
else
source
end