From ad935a1aefb16d4b9af541a7eac5cb92cc5fb1d5 Mon Sep 17 00:00:00 2001 From: Benjamin Southall Date: Sat, 11 Mar 2017 17:52:39 +0900 Subject: [PATCH] Feature Req: on/off button for auto-reload js #1 Fix incorrect insertAfter selector which prevented page from being updated when auto-reloaded and caused new post count to climb incorrectly in title of page --- 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 4acab9e6..fba26849 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').next()).after('
'); + $(this).insertAfter($('div.post:not(.post-hover):last')).after('
'); new_posts++; loaded_posts++; $(document).trigger('new_post', this);