Update archive redirection for /pol/ and /vg/.

This commit is contained in:
Mayhem 2013-06-18 22:04:05 +02:00
parent b117ad5e15
commit 86b44f1c60
3 changed files with 12 additions and 18 deletions

View File

@ -4930,6 +4930,7 @@
case 'm':
case 'q':
case 'tg':
case 'vg':
case 'vp':
case 'vr':
case 'wsg':
@ -4950,8 +4951,6 @@
case 'h':
case 'v':
return "//loveisover.me/" + board + "/full_image/" + filename;
case 'vg':
return "http://nth.pensivenonsen.se/" + board + "/full_image/" + filename;
case 'adv':
case 'asp':
case 'cm':
@ -4994,6 +4993,7 @@
case 'sp':
case 'tg':
case 'tv':
case 'vg':
case 'vp':
case 'vr':
case 'wsg':
@ -5015,8 +5015,6 @@
case 'h':
case 'v':
return "//loveisover.me/_/api/chan/post/?board=" + board + "&num=" + postID;
case 'vg':
return "http://nth.pensivenonsen.se/_/api/chan/post/?board=" + board + "&num=" + postID;
case 'adv':
case 'asp':
case 'cm':
@ -5026,6 +5024,7 @@
case 'n':
case 'o':
case 'p':
case 'pol':
case 's':
case 's4s':
case 't':
@ -5050,6 +5049,7 @@
case 'sp':
case 'tg':
case 'tv':
case 'vg':
case 'vp':
case 'vr':
case 'wsg':
@ -5077,9 +5077,6 @@
case 'v':
url = Redirect.path('//loveisover.me', 'foolfuuka', data);
break;
case 'vg':
url = Redirect.path('http://nth.pensivenonsen.se', 'foolfuuka', data);
break;
case 'adv':
case 'asp':
case 'cm':
@ -5089,6 +5086,7 @@
case 'n':
case 'o':
case 'p':
case 'pol':
case 's':
case 's4s':
case 't':

View File

@ -1,4 +1,6 @@
master
- Mayhem
Update archive redirection for /pol/ and /vg/.
2.39.6
- Mayhem

View File

@ -4086,7 +4086,7 @@ Redirect =
image: (board, filename) ->
# Do not use g.BOARD, the image url can originate from a cross-quote.
switch board
when 'a', 'gd', 'jp', 'm', 'q', 'tg', 'vp', 'vr', 'wsg'
when 'a', 'gd', 'jp', 'm', 'q', 'tg', 'vg', 'vp', 'vr', 'wsg'
"//archive.foolz.us/#{board}/full_image/#{filename}"
when 'u'
"//nsfw.foolz.us/#{board}/full_image/#{filename}"
@ -4098,8 +4098,6 @@ Redirect =
"//archive.nyafuu.org/#{board}/full_image/#{filename}"
when 'd', 'h', 'v'
"//loveisover.me/#{board}/full_image/#{filename}"
when 'vg'
"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'
@ -4112,7 +4110,7 @@ Redirect =
# XXX foolz had HSTS set for 120 days, which broke XHR+CORS+Redirection when on HTTP.
# Remove necessary HTTPS procotol in September 2013.
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', 'vg', 'vp', 'vr', 'wsg'
"https://archive.foolz.us/_/api/chan/post/?board=#{board}&num=#{postID}"
when 'u'
"https://nsfw.foolz.us/_/api/chan/post/?board=#{board}&num=#{postID}"
@ -4124,16 +4122,14 @@ Redirect =
"//archive.nyafuu.org/_/api/chan/post/?board=#{board}&num=#{postID}"
when 'd', 'h', 'v'
"//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'
when 'adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 'pol', 's', 's4s', 't', 'trv', 'y'
"//archive.foolzashit.com/_/api/chan/post/?board=#{board}&num=#{postID}"
to: (data) ->
unless data.isSearch
{threadID} = data
{board} = data
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', 'vg', 'vp', 'vr', 'wsg'
url = Redirect.path '//archive.foolz.us', 'foolfuuka', data
when 'u'
url = Redirect.path '//nsfw.foolz.us', 'foolfuuka', data
@ -4145,9 +4141,7 @@ Redirect =
url = Redirect.path '//archive.nyafuu.org', 'foolfuuka', data
when 'd', 'h', 'v'
url = Redirect.path '//loveisover.me', 'foolfuuka', data
when 'vg'
url = Redirect.path 'http://nth.pensivenonsen.se', 'foolfuuka', data
when 'adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 's', 's4s', 't', 'trv', 'y'
when 'adv', 'asp', 'cm', 'e', 'i', 'lgbt', 'n', 'o', 'p', 'pol', 's', 's4s', 't', 'trv', 'y'
url = Redirect.path '//archive.foolzashit.com', 'foolfuuka', data
when 'diy', 'g', 'sci'
url = Redirect.path '//archive.installgentoo.net', 'fuuka', data