Update archive redirection for even more boards.

This commit is contained in:
Mayhem 2013-05-11 18:59:06 +02:00
parent 77461c91f3
commit cb3623eca3
2 changed files with 34 additions and 26 deletions

View File

@ -1,4 +1,6 @@
master master
- Mayhem
Update archive redirection for even more boards.
2.39.4 2.39.4
- Mayhem - Mayhem

View File

@ -4092,20 +4092,22 @@ Redirect =
"//nsfw.foolz.us/#{board}/full_image/#{filename}" "//nsfw.foolz.us/#{board}/full_image/#{filename}"
when 'po' when 'po'
"//archive.thedarkcave.org/#{board}/full_image/#{filename}" "//archive.thedarkcave.org/#{board}/full_image/#{filename}"
when 'hr', 'tv' when 'hr', 'tv', 'x'
"http://archive.4plebs.org/#{board}/full_image/#{filename}" "http://archive.4plebs.org/#{board}/full_image/#{filename}"
when 'c', 'w', 'wg' when 'c', 'w', 'wg'
"//archive.nyafuu.org/#{board}/full_image/#{filename}" "//archive.nyafuu.org/#{board}/full_image/#{filename}"
when 'vg' when 'd', 'h', 'v'
"http://archive.nihil-ad-rem.net/#{board}/full_image/#{filename}"
when 'd'
"//loveisover.me/#{board}/full_image/#{filename}" "//loveisover.me/#{board}/full_image/#{filename}"
when 'ck', 'fa', 'lit', 's4s' when 'vg'
"//fuuka.warosu.org/#{board}/full_image/#{filename}" "http://nth.pensivenonsen.se/#{board}/full_image/#{filename}"
when 'adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 's', 's4s', 't', 'trv', 'y'
"//archive.foolzashit.com/#{board}/full_image/#{filename}"
when 'cgl', 'g', 'mu' when 'cgl', 'g', 'mu'
"//rbt.asia/#{board}/full_image/#{filename}" "//rbt.asia/#{board}/full_image/#{filename}"
when 'an', 'k', 'toy', 'x' when 'an', 'k', 'toy'
"http://archive.heinessen.com/#{board}/full_image/#{filename}" "http://archive.heinessen.com/#{board}/full_image/#{filename}"
when '3', 'ck', 'fa', 'ic', 'lit'
"//fuuka.warosu.org/#{board}/full_image/#{filename}"
post: (board, postID) -> post: (board, postID) ->
# XXX foolz had HSTS set for 120 days, which broke XHR+CORS+Redirection when on HTTP. # XXX foolz had HSTS set for 120 days, which broke XHR+CORS+Redirection when on HTTP.
# Remove necessary HTTPS procotol in September 2013. # Remove necessary HTTPS procotol in September 2013.
@ -4120,37 +4122,41 @@ Redirect =
"http://archive.4plebs.org/_/api/chan/post/?board=#{board}&num=#{postID}" "http://archive.4plebs.org/_/api/chan/post/?board=#{board}&num=#{postID}"
when 'c', 'w', 'wg' when 'c', 'w', 'wg'
"//archive.nyafuu.org/_/api/chan/post/?board=#{board}&num=#{postID}" "//archive.nyafuu.org/_/api/chan/post/?board=#{board}&num=#{postID}"
when 'v', 'vg' when 'd', 'h', 'v'
"http://archive.nihil-ad-rem.net/_/api/chan/post/?board=#{board}&num=#{postID}"
when 'd'
"//loveisover.me/_/api/chan/post/?board=#{board}&num=#{postID}" "//loveisover.me/_/api/chan/post/?board=#{board}&num=#{postID}"
when 'vg'
"http://nth.pensivenonsen.se/_/api/chan/post/?board=#{board}&num=#{postID}"
when 'adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 's', 's4s', 't', 'trv', 'y'
"//archive.foolzashit.com/_/api/chan/post/?board=#{board}&num=#{postID}"
to: (data) -> to: (data) ->
unless data.isSearch unless data.isSearch
{threadID} = data {threadID} = data
{board} = data {board} = data
switch board switch board
when 'a', 'co', 'gd', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'vp', 'vr', 'wsg' when 'a', 'co', 'gd', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'vp', 'vr', 'wsg'
url = Redirect.path '//archive.foolz.us', 'foolfuuka', data url = Redirect.path '//archive.foolz.us', 'foolfuuka', data
when 'u' when 'u'
url = Redirect.path '//nsfw.foolz.us', 'foolfuuka', data url = Redirect.path '//nsfw.foolz.us', 'foolfuuka', data
when 'int', 'out', 'po' when 'int', 'out', 'po'
url = Redirect.path '//archive.thedarkcave.org', 'foolfuuka', data url = Redirect.path '//archive.thedarkcave.org', 'foolfuuka', data
when 'hr' when 'hr', 'x'
url = Redirect.path 'http://archive.4plebs.org', 'foolfuuka', data url = Redirect.path 'http://archive.4plebs.org', 'foolfuuka', data
when 'c', 'w', 'wg' when 'c', 'w', 'wg'
url = Redirect.path '//archive.nyafuu.org', 'foolfuuka', data url = Redirect.path '//archive.nyafuu.org', 'foolfuuka', data
when 'v', 'vg' when 'd', 'h', 'v'
url = Redirect.path 'http://archive.nihil-ad-rem.net', 'foolfuuka', data url = Redirect.path '//loveisover.me', 'foolfuuka', data
when 'd' when 'vg'
url = Redirect.path '//loveisover.me', 'foolfuuka', data url = Redirect.path 'http://nth.pensivenonsen.se', 'foolfuuka', data
when 'ck', 'fa', 'lit', 's4s' when 'adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 's', 's4s', 't', 'trv', 'y'
url = Redirect.path '//fuuka.warosu.org', 'fuuka', data url = Redirect.path '//archive.foolzashit.com', 'foolfuuka', data
when 'diy', 'g', 'sci' when 'diy', 'g', 'sci'
url = Redirect.path '//archive.installgentoo.net', 'fuuka', data url = Redirect.path '//archive.installgentoo.net', 'fuuka', data
when 'cgl', 'mu' when 'cgl', 'mu'
url = Redirect.path '//rbt.asia', 'fuuka', data url = Redirect.path '//rbt.asia', 'fuuka', data
when 'an', 'fit', 'k', 'mlp', 'r9k', 'toy', 'x' when 'an', 'fit', 'k', 'mlp', 'r9k', 'toy'
url = Redirect.path 'http://archive.heinessen.com', 'fuuka', data url = Redirect.path 'http://archive.heinessen.com', 'fuuka', data
when '3', 'ck', 'fa', 'ic', 'lit'
url = Redirect.path '//fuuka.warosu.org', 'fuuka', data
else else
if threadID if threadID
url = "//boards.4chan.org/#{board}/" url = "//boards.4chan.org/#{board}/"