From 2fae551db7cc74f8eacfce9e71a105acb119fa48 Mon Sep 17 00:00:00 2001 From: Benjamin Southall Date: Mon, 13 Mar 2017 19:02:22 +0900 Subject: [PATCH] Feature Req: on/off button for auto-reload js #1 Fix insertafter selector so that new post gets autoloaded with the correct formatting and spacing. --- js/auto-reload.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/auto-reload.js b/js/auto-reload.js index fba26849..0282164a 100644 --- a/js/auto-reload.js +++ b/js/auto-reload.js @@ -236,7 +236,7 @@ $(document).ready(function(){ var n = new Notification("New reply to "+$('title').text(), {body: $('
').html(body).text()}); } } - $(this).insertAfter($('div.post:not(.post-hover):last')).after('
'); + $(this).parent().insertAfter($('div.post:not(.post-hover):last').parent().next()).after('
'); new_posts++; loaded_posts++; $(document).trigger('new_post', this);