X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fresources%2Fstatic%2Fjavascript%2Fsone.js;h=60861b5e7344660331c18fc1b0d11182723fa2cf;hb=43f0b7c9feffceff7aabed2d24c1131e24fb8262;hp=6c396f847afaf10657084cb77e8070e136875d76;hpb=25fae7b3f9d5d9da7501ff1b079571c9924e4dc9;p=Sone.git diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 6c396f8..60861b5 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -297,6 +297,17 @@ function getSoneId(element) { return getSoneElement(element).find(".id").text(); } +/** + * Returns the element of the post with the given ID. + * + * @param postId + * The ID of the post + * @returns The element of the post + */ +function getPost(postId) { + return $("#sone .post#" + postId); +} + function getPostElement(element) { return $(element).closest(".post"); }