From: David ‘Bombe’ Roden Date: Fri, 26 Nov 2010 23:07:10 +0000 (+0100) Subject: Only insert posts when on the index or an appropriate “view Sone” page. X-Git-Tag: 0.3.1~2 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=945df2c5ed34ba5be654b2a084ade589a3125067;p=Sone.git Only insert posts when on the index or an appropriate “view Sone” page. --- diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index cb16e64..f3ea9e8 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) {