X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fresources%2Fstatic%2Fjavascript%2Fsone.js;h=6afb2322d6e32c655aaf290f219085fb6cf4e7d2;hb=c50881d2c15c8028893024ad3fca49b71aee55a1;hp=4b4b1d63deae035c78f4fc21f4e076cd7288e663;hpb=a1168ce0672ba1e94e842b868aa2b4531ecce1bd;p=Sone.git diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 4b4b1d6..6afb232 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -874,7 +874,7 @@ function ajaxifyPost(postElement) { } }); (function(postElement) { - var soneId = $(".sone-menu-id", postElement).text(); + var soneId = $(".sone-menu-id:first", postElement).text(); $(".sone-post-menu .follow", postElement).click(function() { var followElement = this; ajaxGet("followSone.ajax", { "sone": soneId, "formPassword": getFormPassword() }, function() { @@ -1516,6 +1516,7 @@ function markSoneAsKnown(soneElement, skipRequest) { $(soneElement).removeClass("new"); if ((typeof skipRequest == "undefined") || !skipRequest) { ajaxGet("markAsKnown.ajax", {"formPassword": getFormPassword(), "type": "sone", "id": getSoneId(soneElement)}); + requestNotifications(); } } } @@ -1528,6 +1529,7 @@ function markPostAsKnown(postElements, skipRequest) { $(postElement).removeClass("new"); if ((typeof skipRequest == "undefined") || !skipRequest) { ajaxGet("markAsKnown.ajax", {"formPassword": getFormPassword(), "type": "post", "id": getPostId(postElement)}); + requestNotifications(); } })(postElement); } @@ -1544,6 +1546,7 @@ function markReplyAsKnown(replyElements, skipRequest) { $(replyElement).removeClass("new"); if ((typeof skipRequest == "undefined") || !skipRequest) { ajaxGet("markAsKnown.ajax", {"formPassword": getFormPassword(), "type": "reply", "id": getReplyId(replyElement)}); + requestNotifications(); } })(replyElement); }