X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fresources%2Fstatic%2Fjavascript%2Fsone.js;h=e99d654cea647f7bace7e3a2ea8807284ef7d08a;hb=8dea6187151fc392e6274cbca27157f0effafd35;hp=c5296caebd7e50f233755d01e76d0ff2f0ceeffe;hpb=d3d8c053c8635e90452e620d98fd2e8c0f3ad89a;p=Sone.git diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index c5296ca..e99d654 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -692,6 +692,16 @@ function ajaxifyPost(postElement) { return false; }); + /* convert bookmark/unbookmark buttons to javascript functions. */ + $(postElement).find(".bookmark").submit(function() { + bookmarkPost(getPostId(this)); + return false; + }); + $(postElement).find(".unbookmark").submit(function() { + unbookmarkPost(getPostId(this)); + return false; + }); + /* add “comment” link. */ addCommentLink(getPostId(postElement), postElement, $(postElement).find(".post-status-line .time"));