Add /q/ archive redirection. Close #648.
This commit is contained in:
parent
0d136c967a
commit
2de968891c
@ -4467,6 +4467,7 @@
|
||||
case 'a':
|
||||
case 'jp':
|
||||
case 'm':
|
||||
case 'q':
|
||||
case 'sp':
|
||||
case 'tg':
|
||||
case 'vg':
|
||||
@ -4482,6 +4483,7 @@
|
||||
case 'co':
|
||||
case 'jp':
|
||||
case 'm':
|
||||
case 'q':
|
||||
case 'sp':
|
||||
case 'tg':
|
||||
case 'tv':
|
||||
@ -4507,6 +4509,7 @@
|
||||
case 'co':
|
||||
case 'jp':
|
||||
case 'm':
|
||||
case 'q':
|
||||
case 'sp':
|
||||
case 'tg':
|
||||
case 'tv':
|
||||
|
||||
@ -3551,7 +3551,7 @@ Redirect =
|
||||
image: (board, filename) ->
|
||||
# Do not use g.BOARD, the image url can originate from a cross-quote.
|
||||
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}"
|
||||
when 'u'
|
||||
"//nsfw.foolz.us/#{board}/full_image/#{filename}"
|
||||
@ -3564,7 +3564,7 @@ Redirect =
|
||||
# "https://md401.homelinux.net/4chan/cgi-board.pl/#{board}/full_image/#{filename}"
|
||||
post: (board, postID) ->
|
||||
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"
|
||||
when 'u', 'kuku'
|
||||
"//nsfw.foolz.us/api/chan/post/board/#{board}/num/#{postID}/format/json"
|
||||
@ -3577,7 +3577,7 @@ Redirect =
|
||||
else
|
||||
"#{board}/post/#{postID}"
|
||||
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}/"
|
||||
if threadID and postID
|
||||
url += "##{postID}"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user