aboutsummaryrefslogtreecommitdiff
path: root/p
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2019-01-26 21:08:27 +0100
committerGravatar GitHub <noreply@github.com> 2019-01-26 21:08:27 +0100
commitef6df8aeca9f7b8dda96ab54fffd05f17b27606b (patch)
tree5840b608e7434e88b2b48f21bd071dd71db58c2d /p
parent34fe41ac78b6bd465c12086edbbd856d9533065c (diff)
parent4872442c62f63ef97a0e12c43b4700b98ebcdc15 (diff)
Merge branch 'dev' into dev-1.14.0
Diffstat (limited to 'p')
-rw-r--r--p/scripts/main.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js
index 4939bf7dd..82dc79ce7 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -297,6 +297,9 @@ function mark_favorite(div) {
});
}
+var freshrssOpenArticleEvent = document.createEvent('Event');
+freshrssOpenArticleEvent.initEvent('freshrss:openArticle', true, true);
+
function toggleContent(new_active, old_active, skipping) {
// If skipping, move current without activating or marking as read
if (!new_active) {
@@ -348,8 +351,11 @@ function toggleContent(new_active, old_active, skipping) {
box_to_move.scrollTop = new_pos;
}
- if (context.auto_mark_article && new_active.classList.contains('active') && !skipping) {
- mark_read(new_active, true);
+ if (new_active.classList.contains('active') && !skipping) {
+ if (context.auto_mark_article) {
+ mark_read(new_active, true);
+ }
+ new_active[0].dispatchEvent(freshrssOpenArticleEvent);
}
onScroll();
}