Add /q/ archive redirection. Close #648.

This commit is contained in:
Nicolas Stepien 2012-08-08 16:59:35 +02:00
parent 0d136c967a
commit 2de968891c
3 changed files with 8 additions and 3 deletions

View File

@ -4467,6 +4467,7 @@
case 'a': case 'a':
case 'jp': case 'jp':
case 'm': case 'm':
case 'q':
case 'sp': case 'sp':
case 'tg': case 'tg':
case 'vg': case 'vg':
@ -4482,6 +4483,7 @@
case 'co': case 'co':
case 'jp': case 'jp':
case 'm': case 'm':
case 'q':
case 'sp': case 'sp':
case 'tg': case 'tg':
case 'tv': case 'tv':
@ -4507,6 +4509,7 @@
case 'co': case 'co':
case 'jp': case 'jp':
case 'm': case 'm':
case 'q':
case 'sp': case 'sp':
case 'tg': case 'tg':
case 'tv': case 'tv':

View File

@ -1,4 +1,6 @@
master master
- Mayhem
Add /q/ archive redirection.
2.34.3 2.34.3
- Mayhem - Mayhem

View File

@ -3551,7 +3551,7 @@ Redirect =
image: (board, filename) -> image: (board, filename) ->
# Do not use g.BOARD, the image url can originate from a cross-quote. # Do not use g.BOARD, the image url can originate from a cross-quote.
switch board switch board
when 'a', 'jp', 'm', 'sp', 'tg', 'vg', 'wsg' when 'a', 'jp', 'm', 'q', 'sp', 'tg', 'vg', 'wsg'
"//archive.foolz.us/#{board}/full_image/#{filename}" "//archive.foolz.us/#{board}/full_image/#{filename}"
when 'u' when 'u'
"//nsfw.foolz.us/#{board}/full_image/#{filename}" "//nsfw.foolz.us/#{board}/full_image/#{filename}"
@ -3564,7 +3564,7 @@ Redirect =
# "https://md401.homelinux.net/4chan/cgi-board.pl/#{board}/full_image/#{filename}" # "https://md401.homelinux.net/4chan/cgi-board.pl/#{board}/full_image/#{filename}"
post: (board, postID) -> post: (board, postID) ->
switch board switch board
when 'a', 'co', 'jp', 'm', 'sp', 'tg', 'tv', 'v', 'vg', 'wsg', 'dev', 'foolz' when 'a', 'co', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'v', 'vg', 'wsg', 'dev', 'foolz'
"//archive.foolz.us/api/chan/post/board/#{board}/num/#{postID}/format/json" "//archive.foolz.us/api/chan/post/board/#{board}/num/#{postID}/format/json"
when 'u', 'kuku' when 'u', 'kuku'
"//nsfw.foolz.us/api/chan/post/board/#{board}/num/#{postID}/format/json" "//nsfw.foolz.us/api/chan/post/board/#{board}/num/#{postID}/format/json"
@ -3577,7 +3577,7 @@ Redirect =
else else
"#{board}/post/#{postID}" "#{board}/post/#{postID}"
switch board switch board
when 'a', 'co', 'jp', 'm', 'sp', 'tg', 'tv', 'v', 'vg', 'wsg', 'dev', 'foolz' when 'a', 'co', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'v', 'vg', 'wsg', 'dev', 'foolz'
url = "//archive.foolz.us/#{path}/" url = "//archive.foolz.us/#{path}/"
if threadID and postID if threadID and postID
url += "##{postID}" url += "##{postID}"