fix redirections

This commit is contained in:
Nicolas Stepien 2013-01-24 13:55:41 +01:00
parent 81dd0fe9af
commit 7e2fb6d4ae
2 changed files with 6 additions and 6 deletions

View File

@ -1016,7 +1016,7 @@
Redirect = { Redirect = {
image: function(board, filename) { image: function(board, filename) {
switch (board) { switch (board.ID) {
case 'a': case 'a':
case 'co': case 'co':
case 'jp': case 'jp':
@ -1057,7 +1057,7 @@
} }
}, },
post: function(board, postID) { post: function(board, postID) {
switch (board) { switch (board.ID) {
case 'a': case 'a':
case 'co': case 'co':
case 'jp': case 'jp':
@ -1082,7 +1082,7 @@
to: function(data) { to: function(data) {
var board, url; var board, url;
board = data.board; board = data.board;
switch (board) { switch (board.ID) {
case 'a': case 'a':
case 'co': case 'co':
case 'jp': case 'jp':

View File

@ -248,7 +248,7 @@ Redirect =
image: (board, filename) -> image: (board, filename) ->
# XXX need to differentiate between thumbnail only and full_image for img src= # XXX need to differentiate between thumbnail only and full_image for img src=
# 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.ID
when 'a', 'co', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'v', 'vg', 'wsg' when 'a', 'co', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'v', 'vg', 'wsg'
"//archive.foolz.us/#{board}/full_image/#{filename}" "//archive.foolz.us/#{board}/full_image/#{filename}"
when 'u' when 'u'
@ -266,7 +266,7 @@ Redirect =
when 'c' when 'c'
"//archive.nyafuu.org/#{board}/full_image/#{filename}" "//archive.nyafuu.org/#{board}/full_image/#{filename}"
post: (board, postID) -> post: (board, postID) ->
switch board switch board.ID
when 'a', 'co', 'jp', 'm', 'q', '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}" "//archive.foolz.us/_/api/chan/post/?board=#{board}&num=#{postID}"
when 'u', 'kuku' when 'u', 'kuku'
@ -277,7 +277,7 @@ Redirect =
# https://github.com/eksopl/fuuka/issues/27 # https://github.com/eksopl/fuuka/issues/27
to: (data) -> to: (data) ->
{board} = data {board} = data
switch board switch board.ID
when 'a', 'co', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'v', 'vg', 'wsg', 'dev', 'foolz' when 'a', 'co', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'v', 'vg', 'wsg', 'dev', 'foolz'
url = Redirect.path '//archive.foolz.us', 'foolfuuka', data url = Redirect.path '//archive.foolz.us', 'foolfuuka', data
when 'u', 'kuku' when 'u', 'kuku'