Add methods to extract the time of posts and replies.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 24 Nov 2010 10:16:44 +0000 (11:16 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 24 Nov 2010 10:16:44 +0000 (11:16 +0100)
src/main/resources/static/javascript/sone.js

index 4277d9a..a039211 100644 (file)
@@ -308,6 +308,10 @@ function getPostId(element) {
        return getPostElement(element).attr("id");
 }
 
+function getPostTime(element) {
+       return getPostElement(element).find(".storage-time").text();
+}
+
 function getReplyElement(element) {
        return $(element).parents(".reply");
 }
@@ -316,6 +320,10 @@ function getReplyId(element) {
        return getReplyElement(element).attr("id");
 }
 
+function getReplyTime(element) {
+       return getReplyElement(element).find(".storage-time").text();
+}
+
 function likePost(postId) {
        $.getJSON("ajax/like.ajax", { "type": "post", "post" : postId, "formPassword": getFormPassword() }, function(data, textStatus) {
                if ((data == null) || !data.success) {