Return the post element if its containing post element is requested.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 24 Nov 2010 10:16:33 +0000 (11:16 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 24 Nov 2010 10:16:33 +0000 (11:16 +0100)
src/main/resources/static/javascript/sone.js

index 149520f..4277d9a 100644 (file)
@@ -301,7 +301,7 @@ function getSoneId(element) {
 }
 
 function getPostElement(element) {
-       return $(element).parents(".post");
+       return $(element).hasClass("post") ? $(element) : $(element).parents(".post");
 }
 
 function getPostId(element) {