From 50b34fb414b3a5a15a445e8a71bec1efbc1ecde2 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sat, 8 Dec 2012 17:37:08 +0100 Subject: Ajout mode lecture (en js par contre) fix issue #6 --- public/scripts/endless_mode.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'public/scripts/endless_mode.js') diff --git a/public/scripts/endless_mode.js b/public/scripts/endless_mode.js index 30b91822c..7a9840cd4 100644 --- a/public/scripts/endless_mode.js +++ b/public/scripts/endless_mode.js @@ -10,7 +10,7 @@ function load_more_refresh () { } } -function load_more_posts () { +function load_more_posts (f_callback) { load = true; $.get (url_next_page, function (data) { $("#load_more").before ($("#stream .post", data)); @@ -19,6 +19,9 @@ function load_more_posts () { init_posts (); load_more_refresh (); + if (typeof f_callback == 'function') { + f_callback.call (this); + } load = false; }); } -- cgit v1.2.3