From 4ba66d7833ee6abf41acc722268c5e19c48e95df Mon Sep 17 00:00:00 2001 From: ccd0 Date: Mon, 28 Mar 2016 02:22:18 -0700 Subject: [PATCH] Allow upvoting from index even though we can't tally from there. --- src/Quotelinks/Upvotes.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Quotelinks/Upvotes.coffee b/src/Quotelinks/Upvotes.coffee index 433c8454b..18f8edc15 100644 --- a/src/Quotelinks/Upvotes.coffee +++ b/src/Quotelinks/Upvotes.coffee @@ -4,7 +4,7 @@ Upvotes = regexp: /(?:^>.*\n)+\s*(?:\u305D\u3046\u3060\u306D|this)/gmi init: -> - return unless g.VIEW is 'thread' and Conf['Upvotes'] + return unless g.VIEW in ['thread', 'index'] and Conf['Upvotes'] @textPosted = if g.BOARD.ID is 'r9k' then 'This.' else @text Post.callbacks.push name: 'Upvotes' @@ -26,6 +26,8 @@ Upvotes = @nodes.vote = a $.on a, 'click', Upvotes.vote + return unless g.VIEW is 'thread' + Upvotes.count[@fullID] = 0 quotes = {}