From d12d2cf374a0c791d17f560450a8495131b79644 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 6 Apr 2011 06:37:35 +0200 Subject: [PATCH] Add getReply() function that works the same as getPost(). --- src/main/resources/static/javascript/sone.js | 11 +++++++++++ 1 file changed, 11 insertions(+) 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"); } -- 2.7.4