Add getReply() function that works the same as getPost().
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 6 Apr 2011 04:37:35 +0000 (06:37 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 6 Apr 2011 04:37:35 +0000 (06:37 +0200)
src/main/resources/static/javascript/sone.js

index 88fb3e3..232d9fc 100644 (file)
@@ -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");
 }