From: David ‘Bombe’ Roden Date: Thu, 26 May 2011 05:06:57 +0000 (+0200) Subject: Small optimization. X-Git-Tag: 0.6.5^2~20 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=7a3294ce60f63bb871e0196155bcc3cd84bcbfe2;p=Sone.git Small optimization. --- diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 9c082f1..fbed217 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -1709,7 +1709,7 @@ $(document).ready(function() { allReplies = $(this).find(".reply"); if (allReplies.length > 2) { newHidden = false; - for (replyIndex = 0; replyIndex < (allReplies.length - 2); ++replyIndex) { + for (replyIndex = 0; !newHidden && (replyIndex < (allReplies.length - 2)); ++replyIndex) { $(allReplies[replyIndex]).addClass("hidden"); newHidden |= $(allReplies[replyIndex]).hasClass("new"); }