From: David ‘Bombe’ Roden Date: Wed, 6 Apr 2011 04:37:35 +0000 (+0200) Subject: Add getReply() function that works the same as getPost(). X-Git-Tag: 0.6.1^2~28 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=d12d2cf374a0c791d17f560450a8495131b79644;p=Sone.git Add getReply() function that works the same as getPost(). --- diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 88fb3e3..232d9fc 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -333,6 +333,17 @@ function getPostAuthor(element) { return getPostElement(element).find(".post-author").text(); } +/** + * Returns the element of the reply with the given ID. + * + * @param replyId + * The ID of the reply + * @returns The element of the reply + */ +function getReply(replyId) { + return $("#sone .reply#" + replyId); +} + function getReplyElement(element) { return $(element).closest(".reply"); }