diff --git a/js/auto-reload.js b/js/auto-reload.js index 0282164a..299ca166 100644 --- a/js/auto-reload.js +++ b/js/auto-reload.js @@ -236,7 +236,12 @@ $(document).ready(function(){ var n = new Notification("New reply to "+$('title').text(), {body: $('
').html(body).text()}); } } - $(this).parent().insertAfter($('div.post:not(.post-hover):last').parent().next()).after('
'); + if ($("div.post").length > 1){ + $(this).parent().insertAfter($('div.post:not(.post-hover):last').parent().next()).after('
'); + } + else { + $(this).insertAfter($('div.post:not(.post-hover):last')).after('
'); + } new_posts++; loaded_posts++; $(document).trigger('new_post', this);