From f0b5c5aa27d93b110a134f05b349dd034d67a30f Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 26 Mar 2012 00:59:32 +0200 Subject: [PATCH] Fix switch parameter, silly me. This fixes cross-board quotifying href. --- 4chan_x.user.js | 4 ++-- script.coffee | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index dc50b1fb6..4b1e5649c 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3531,7 +3531,7 @@ if (id == null) id = g.THREAD_ID; if (mode == null) mode = 'thread'; if (!(Conf['404 Redirect'] || mode === 'post')) return; - switch (g.BOARD) { + switch (board) { case 'a': case 'jp': case 'm': @@ -3540,7 +3540,7 @@ case 'u': case 'v': case 'vg': - return "http://archive.foolz.us/" + board + "/thread/" + id + "/"; + return "http://archive.foolz.us/" + board + "/" + mode + "/" + id + "/"; case 'lit': return "http://fuuka.warosu.org/" + board + "/" + mode + "/" + id; case 'diy': diff --git a/script.coffee b/script.coffee index 82b0341fd..2b956c0ba 100644 --- a/script.coffee +++ b/script.coffee @@ -2969,9 +2969,9 @@ Redirect = "http://archive.foolz.us/#{href[3]}/full_image/#{href[5]}" thread: (board=g.BOARD, id=g.THREAD_ID, mode='thread') -> return unless Conf['404 Redirect'] or mode is 'post' - switch g.BOARD + switch board when 'a', 'jp', 'm', 'tg', 'tv', 'u', 'v', 'vg' - "http://archive.foolz.us/#{board}/thread/#{id}/" + "http://archive.foolz.us/#{board}/#{mode}/#{id}/" when 'lit' "http://fuuka.warosu.org/#{board}/#{mode}/#{id}" when 'diy', 'g', 'sci'