From 5cd7e0c5e05e26827c325fe3574b9e9ef2bf1250 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Sun, 28 Jul 2013 19:53:41 +0200 Subject: [PATCH 1/2] Whitespace fixes. --- .gitattributes | 2 +- src/General/Post.coffee | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitattributes b/.gitattributes index 212566614..176a458f9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -* text=auto \ No newline at end of file +* text=auto diff --git a/src/General/Post.coffee b/src/General/Post.coffee index 7faf5f343..6da7f33dc 100644 --- a/src/General/Post.coffee +++ b/src/General/Post.coffee @@ -80,7 +80,7 @@ class Post for quotelink in $$ '.quotelink', @nodes.comment @parseQuote quotelink return - + parseQuote: (quotelink) -> # Only add quotes that link to posts on an imageboard. # Don't add: @@ -100,7 +100,7 @@ class Post # Don't count capcode replies as quotes in OPs. (Admin/Mod/Dev Replies: ...) return if @isClone or !@isReply and $.hasClass quotelink.parentNode.parentNode, 'capcodeReplies' - + # ES6 Set when? fullID = "#{match[1]}.#{match[2]}" @quotes.push fullID if @quotes.indexOf(fullID) is -1 From 6ee8dc83a7f036dda627e1998a18eaa59c749103 Mon Sep 17 00:00:00 2001 From: Mayhem Date: Tue, 30 Jul 2013 15:13:33 +0200 Subject: [PATCH 2/2] Fix #1210 We were inserting the same Post twice in QR.posts, once in the constructor, and once in the splice. --- src/Posting/QR.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index 8319392a2..c77bdda1e 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -74,7 +74,8 @@ QR = QR.cleanNotifications() d.activeElement.blur() $.rmClass QR.nodes.el, 'dump' - for post in QR.posts.splice 0, QR.posts.length, new QR.post true + new QR.post true + for post in QR.posts.splice 0, QR.posts.length - 1 post.delete() QR.cooldown.auto = false QR.status()