diff options
| author | 2019-01-26 21:08:27 +0100 | |
|---|---|---|
| committer | 2019-01-26 21:08:27 +0100 | |
| commit | ef6df8aeca9f7b8dda96ab54fffd05f17b27606b (patch) | |
| tree | 5840b608e7434e88b2b48f21bd071dd71db58c2d /p | |
| parent | 34fe41ac78b6bd465c12086edbbd856d9533065c (diff) | |
| parent | 4872442c62f63ef97a0e12c43b4700b98ebcdc15 (diff) | |
Merge branch 'dev' into dev-1.14.0
Diffstat (limited to 'p')
| -rw-r--r-- | p/scripts/main.js | 10 |
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(); } |
