From 61c23c54b4122352f8b9c4f8e696b2f37f7828d9 Mon Sep 17 00:00:00 2001 From: ghostrigger Date: Thu, 12 Jun 2014 09:50:21 +0800 Subject: [PATCH] #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 --- app/models/post.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/models/post.rb b/app/models/post.rb index 21e61e7da..8b7ee5374 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -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