From 6228248c15425378033cf0277cf8ad184672b581 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Sat, 9 Aug 2014 18:14:02 -0700 Subject: [PATCH] Fix "Allow post fetching to work if no archive is selected for thread redirection." fixes commit c21a8b217f87336b71212169ed71db0c81cb63ee --- src/Quotelinks/Quotify.coffee | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/Quotelinks/Quotify.coffee b/src/Quotelinks/Quotify.coffee index 2684fa518..feb35af40 100755 --- a/src/Quotelinks/Quotify.coffee +++ b/src/Quotelinks/Quotify.coffee @@ -58,17 +58,20 @@ Quotify = $.extend a.dataset, {boardID, threadID: post.thread.ID, postID} - else if (redirect = Redirect.to 'thread', {boardID, threadID: 0, postID}) or (fetchable = Redirect.to 'post', {boardID, postID}) - # Replace the .deadlink span if we can redirect or fetch the post. - a = $.el 'a', - href: redirect or 'javascript:;' - className: 'deadlink' - target: '_blank' - textContent: "#{quote}\u00A0(Dead)" - if fetchable - # Make it function as a normal quote if we can fetch the post. - $.addClass a, 'quotelink' - $.extend a.dataset, {boardID, postID} + else + redirect = Redirect.to 'thread', {boardID, threadID: 0, postID} + fetchable = Redirect.to 'post', {boardID, postID} + if redirect or fetchable + # Replace the .deadlink span if we can redirect or fetch the post. + a = $.el 'a', + href: redirect or 'javascript:;' + className: 'deadlink' + target: '_blank' + textContent: "#{quote}\u00A0(Dead)" + if fetchable + # Make it function as a normal quote if we can fetch the post. + $.addClass a, 'quotelink' + $.extend a.dataset, {boardID, postID} @quotes.push quoteID unless quoteID in @quotes