X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fresources%2Fstatic%2Fjavascript%2Fsone.js;h=09c0bb03692054def671ce446b8d464e167012de;hb=a71b6e40fe24fd8d2e1e0c6f449ddd82d6d831b3;hp=58fbf958692ace8a0fffc0d7f7e1897696b32bdd;hpb=d31b2f503415cb9085facf68db4fc429d3564962;p=Sone.git diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 58fbf95..09c0bb0 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -569,6 +569,20 @@ function ajaxifyPost(postElement) { return false; }); + /* convert trust control buttons to javascript functions. */ + $(postElement).find(".post-trust").submit(function() { + trustSone(getPostAuthor(this)); + return false; + }); + $(postElement).find(".post-distrust").submit(function() { + distrustSone(getPostAuthor(this)); + return false; + }); + $(postElement).find(".post-untrust").submit(function() { + untrustSone(getPostAuthor(this)); + return false; + }); + /* add “comment” link. */ addCommentLink(getPostId(postElement), postElement, $(postElement).find(".post-status-line .time"));