From: David ‘Bombe’ Roden Date: Wed, 24 Nov 2010 10:16:33 +0000 (+0100) Subject: Return the post element if its containing post element is requested. X-Git-Tag: 0.3.1-RC1~36 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=7c56ff62990b690bc1031e27b4e95eb8fc9fc721;p=Sone.git Return the post element if its containing post element is requested. --- diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 149520f..4277d9a 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -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) {