From 9b0aa74875c25f8135b9d8dafabefb3f13c65f25 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Tue, 12 Mar 2013 04:46:35 +0100 Subject: [PATCH] Fix `Post no.0` with deadlinks. #932 --- 4chan_x.user.js | 8 ++------ src/features.coffee | 6 +++--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 91b6acaed..fb6c9d0a8 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3738,13 +3738,9 @@ className: 'quotelink', textContent: quote }); - } else if (redirect = Redirect.to({ - board: board, - threadID: post.thread.ID, - postID: ID - })) { + } else { a = $.el('a', { - href: redirect, + href: "/" + board + "/" + post.thread + "/res/#p" + ID, className: 'quotelink deadlink', target: '_blank', textContent: "" + quote + "\u00A0(Dead)" diff --git a/src/features.coffee b/src/features.coffee index 2b2579c51..d4296d24a 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -2409,17 +2409,17 @@ Quotify = href: "/#{board}/#{post.thread}/res/#p#{ID}" className: 'quotelink' textContent: quote - else if redirect = Redirect.to {board: board, threadID: post.thread.ID, postID: ID} + else # Replace the .deadlink span if we can redirect. a = $.el 'a', - href: redirect + href: "/#{board}/#{post.thread}/res/#p#{ID}" className: 'quotelink deadlink' target: '_blank' textContent: "#{quote}\u00A0(Dead)" a.setAttribute 'data-board', board a.setAttribute 'data-threadid', post.thread.ID a.setAttribute 'data-postid', ID - else if redirect = Redirect.to {board: board, threadID: 0, postID: ID} + else if redirect = Redirect.to {board, threadID: 0, postID: ID} # Replace the .deadlink span if we can redirect. a = $.el 'a', href: redirect