From 646c99ab582991e3471faca2c48991e31a6c988e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20=C5=81abanowski?= Date: Sun, 26 Jan 2014 18:07:34 +0100 Subject: [PATCH] watch.js: update status on new own posts as fast as possible. fixes vichan-devel#41 --- js/ajax.js | 2 ++ js/watch.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/js/ajax.js b/js/ajax.js index 94f033c3..f456099d 100644 --- a/js/ajax.js +++ b/js/ajax.js @@ -85,6 +85,8 @@ $(window).ready(function() { if($('#' + id).length == 0) { $(this).insertAfter($('div.post:last').next()).after('
'); $(document).trigger('new_post', this); + // watch.js & auto-reload.js retrigger + setTimeout(function() { window.trigger("scroll"); }, 100); } }); diff --git a/js/watch.js b/js/watch.js index 91b325e4..f7795db5 100644 --- a/js/watch.js +++ b/js/watch.js @@ -360,7 +360,7 @@ $(function(){ fetch_jsons(); refresh = false; } - }); + }).trigger("scroll"); if (typeof add_title_collector != "undefined") add_title_collector(function() {