X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fresources%2Fstatic%2Fjavascript%2Fsone.js;h=a3dbc6488427e3a81a53f11b13e4da0863f6ff98;hb=b371274f1185ad36e7d450559766678be2cb5fe1;hp=bbd039c85f013c92d83ee278e890f879fa281c84;hpb=05f968bfa954585e942bbaff078d8932429f3175;p=Sone.git diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index bbd039c..a3dbc64 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -1193,17 +1193,17 @@ function getStatus() { } }); if (!foundNotification) { - if (notificationId == "new-sone-notification") { + if (notificationId == "new-sone-notification" && (data.options["ShowNotification/NewSones"] == true)) { $(".new-sone-id", this).each(function(index, element) { soneId = $(this).text(); markSoneAsKnown(getSone(soneId), true); }); - } else if (notificationId == "new-post-notification") { + } else if (notificationId == "new-post-notification" && (data.options["ShowNotification/NewPosts"] == true)) { $(".post-id", this).each(function(index, element) { postId = $(this).text(); markPostAsKnown(getPost(postId), true); }); - } else if (notificationId == "new-reply-notification") { + } else if (notificationId == "new-reply-notification" && (data.options["ShowNotification/NewReplies"] == true)) { $(".reply-id", this).each(function(index, element) { replyId = $(this).text(); markReplyAsKnown(getReply(replyId), true); @@ -1347,7 +1347,7 @@ function isViewSonePage() { * @returns The ID of the currently shown Sone */ function getShownSoneId() { - return $("#sone .sone-id").text(); + return $("#sone .sone-id").first().text(); } /**