summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2016-10-06 22:36:30 +0200
committerGravatar GitHub <noreply@github.com> 2016-10-06 22:36:30 +0200
commit57115d9ef740cf6c5a5b5bb361b365f6c61bdef0 (patch)
tree8fac4bb8d434d7a68f703bbc28d7961e53f9fa5c
parentdfcc40bcae6d9501610f7ee2ffa5d08a7067b8d6 (diff)
parent2fa269fafcb260addca269e097d25bec77acf0b6 (diff)
Merge pull request #1287 from Alkarex/load-event
FreshRSS custom event 'freshrss:load-more'
-rw-r--r--CHANGELOG.md2
-rw-r--r--p/scripts/main.js5
2 files changed, 7 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2bc9d1e36..1bc3ba3df 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -25,6 +25,8 @@
* Prevent `<a target="_blank">` attacks with `window.opener` [#1245](https://github.com/FreshRSS/FreshRSS/issues/1245)
* UI
* Download icon 💾 for podcasts [#1236](https://github.com/FreshRSS/FreshRSS/issues/1236)
+* Extensions
+ * Trigger a `freshrss:load-more` JavaScript event to help extensions [#1278](https://github.com/FreshRSS/FreshRSS/issues/1278)
## 2016-08-29 FreshRSS 1.5.0
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