From 7e2fb6d4aea7c18c55a8f1550b219eb4f26fa0c2 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Thu, 24 Jan 2013 13:55:41 +0100 Subject: [PATCH] fix redirections --- 4chan_x.user.js | 6 +++--- src/features.coffee | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index f3d1cde77..deb5936dd 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1016,7 +1016,7 @@ Redirect = { image: function(board, filename) { - switch (board) { + switch (board.ID) { case 'a': case 'co': case 'jp': @@ -1057,7 +1057,7 @@ } }, post: function(board, postID) { - switch (board) { + switch (board.ID) { case 'a': case 'co': case 'jp': @@ -1082,7 +1082,7 @@ to: function(data) { var board, url; board = data.board; - switch (board) { + switch (board.ID) { case 'a': case 'co': case 'jp': diff --git a/src/features.coffee b/src/features.coffee index a5bccc5da..90bfa7692 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -248,7 +248,7 @@ Redirect = image: (board, filename) -> # 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. - switch board + switch board.ID when 'a', 'co', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'v', 'vg', 'wsg' "//archive.foolz.us/#{board}/full_image/#{filename}" when 'u' @@ -266,7 +266,7 @@ Redirect = when 'c' "//archive.nyafuu.org/#{board}/full_image/#{filename}" post: (board, postID) -> - switch board + switch board.ID when 'a', 'co', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'v', 'vg', 'wsg', 'dev', 'foolz' "//archive.foolz.us/_/api/chan/post/?board=#{board}&num=#{postID}" when 'u', 'kuku' @@ -277,7 +277,7 @@ Redirect = # https://github.com/eksopl/fuuka/issues/27 to: (data) -> {board} = data - switch board + switch board.ID when 'a', 'co', 'jp', 'm', 'q', 'sp', 'tg', 'tv', 'v', 'vg', 'wsg', 'dev', 'foolz' url = Redirect.path '//archive.foolz.us', 'foolfuuka', data when 'u', 'kuku'