X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fresources%2Fstatic%2Fjavascript%2Fsone.js;h=748213866eaf9498797b03aae9a5621f93cab5f4;hb=566268d3acfdf9e012fb966eee0e0ddc11953c3f;hp=cb16e6420d0455ad3d5adc2dea4b8310ae58daa7;hpb=e508676493627c055b09e1eef26ba551aefa6e67;p=Sone.git diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index cb16e64..7482138 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -650,6 +650,9 @@ function loadNewPost(postId) { loadedPosts[postId] = true; $.getJSON("ajax/getPost.ajax", { "post" : postId }, function(data, textStatus) { if ((data != null) && data.success) { + if (!isIndexPage() && !(isViewSonePage() && (getSoneId() == data.post.sone))) { + return; + } var firstOlderPost = null; $("#sone .post").each(function() { if (getPostTime(this) < data.post.time) { @@ -661,7 +664,7 @@ function loadNewPost(postId) { if (firstOlderPost != null) { newPost.insertBefore(firstOlderPost); } else { - $("#sone #posts").append(newPost); + $("#sone .post:last").append(newPost); } ajaxifyPost(newPost); newPost.slideDown();