From: David ‘Bombe’ Roden Date: Sun, 16 Jan 2011 14:05:47 +0000 (+0100) Subject: Don’t show “comment” link if there’s no reply form (i.e. if not logged in). X-Git-Tag: 0.4.2^2~45 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=fe09ccf56bff8dbd80f62493087e6aa92d429feb;p=Sone.git Don’t show “comment” link if there’s no reply form (i.e. if not logged in). --- diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index e0c8162..7fe842b 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -65,7 +65,7 @@ function registerInputTextareaSwap(inputElement, defaultText, inputFieldName, op * The element to add a “comment” link to */ function addCommentLink(postId, element, insertAfterThisElement) { - if ($(element).find(".show-reply-form").length > 0) { + if (($(element).find(".show-reply-form").length > 0) || (getPostElement(element).find(".create-reply").length == 0)) { return; } commentElement = (function(postId) {