X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fresources%2Fstatic%2Fjavascript%2Fsone.js;h=44eee87d50ac1176511dc022cf00503f7dc4477b;hp=05aab1d85f9202d4f36e6bf4d25614c320c3c57f;hb=93019d999d7094db58af2599b33edd4d516735a7;hpb=cc3c5cb776fa7913bdb45ce9602dc0e5cb5c8608 diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 05aab1d..44eee87 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -829,6 +829,12 @@ function ajaxifyPost(postElement) { ajaxGet("followSone.ajax", { "sone": soneId, "formPassword": getFormPassword() }, function() { $(followElement).addClass("hidden"); $(followElement).parent().find(".unfollow").removeClass("hidden"); + $("#sone .sone-menu").each(function() { + if (getMenuSone(this) == soneId) { + $(".follow", this).toggleClass("hidden", true); + $(".unfollow", this).toggleClass("hidden", false); + } + }); }); return false; }); @@ -837,6 +843,12 @@ function ajaxifyPost(postElement) { ajaxGet("unfollowSone.ajax", { "sone": soneId, "formPassword": getFormPassword() }, function() { $(unfollowElement).addClass("hidden"); $(unfollowElement).parent().find(".follow").removeClass("hidden"); + $("#sone .sone-menu").each(function() { + if (getMenuSone(this) == soneId) { + $(".follow", this).toggleClass("hidden", false); + $(".unfollow", this).toggleClass("hidden", true); + } + }); }); return false; });