aboutsummaryrefslogtreecommitdiff
path: root/p/scripts
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-10-06 19:07:54 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-10-06 19:07:54 +0200
commit7adcc0d29d54461222d57924d5d2875d639ca698 (patch)
tree3f6577e8ada104e7be79cb38320ed68ed49aca91 /p/scripts
parentdfcc40bcae6d9501610f7ee2ffa5d08a7067b8d6 (diff)
FreshRSS custom event 'freshrss:load-more'
https://github.com/FreshRSS/FreshRSS/issues/1278
Diffstat (limited to 'p/scripts')
-rw-r--r--p/scripts/main.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js
index 74631451a..2ebd09bcb 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -1021,6 +1021,9 @@ function focus_search() {
$('#search').focus();
}
+var freshrssLoadMoreEvent = document.createEvent('Event');
+freshrssLoadMoreEvent.initEvent('freshrss:load-more', true, true);
+
function init_load_more(box) {
box_load_more = box;
@@ -1030,6 +1033,8 @@ function init_load_more(box) {
});
}
+ document.body.dispatchEvent(freshrssLoadMoreEvent);
+
var $next_link = $("#load_more");
if (!$next_link.length) {
// no more article to load