X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fresources%2Fstatic%2Fjavascript%2Fsone.js;h=f6327e450a5e0e5c72a4d941473ec937acb64099;hb=0df5e91852f737d760c5a9f54c5667309fbadcc2;hp=29c5420607c08ae48567723b37b4e64c9e564379;hpb=74af78bee7dda61c9244b71e170c753bc15f80e4;p=Sone.git diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index 29c5420..f6327e4 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -291,7 +291,7 @@ function getSoneElement(element) { * @return The Sone ID */ function getMenuSone(element) { - return $(element).closest(".sone-menu").find(".sone-id").text(); + return $(element).closest(".sone-menu").find(".sone-menu-id").text(); } /** @@ -865,7 +865,7 @@ function ajaxifyPost(postElement) { return false; }); (function(postElement) { - var soneId = $(".sone-id", postElement).text(); + var soneId = $(".sone-menu-id", postElement).text(); $(".sone-post-menu .follow", postElement).click(function() { var followElement = this; ajaxGet("followSone.ajax", { "sone": soneId, "formPassword": getFormPassword() }, function() { @@ -995,7 +995,7 @@ function ajaxifyReply(replyElement) { return false; }); (function(replyElement) { - var soneId = $(".sone-id", replyElement).text(); + var soneId = $(".sone-menu-id", replyElement).text(); $(".sone-menu .follow", replyElement).click(function() { var followElement = this; ajaxGet("followSone.ajax", { "sone": soneId, "formPassword": getFormPassword() }, function() { @@ -1141,7 +1141,7 @@ function checkForRemovedPosts(oldNotification, newNotification) { * The new notification element */ function checkForRemovedReplies(oldNotification, newNotification) { - if (getNotificationId(oldNotification) != "new-replies-notification") { + if (getNotificationId(oldNotification) != "new-reply-notification") { return; } oldIds = getElementIds(oldNotification, ".reply-id"); @@ -1185,7 +1185,7 @@ function getStatus() { postId = $(this).text(); markPostAsKnown(getPost(postId), true); }); - } else if (notificationId == "new-replies-notification") { + } else if (notificationId == "new-reply-notification") { $(".reply-id", this).each(function(index, element) { replyId = $(this).text(); markReplyAsKnown(getReply(replyId), true);