From b9939bdaac75233ab52c7c7a483d5e4feb4921a4 Mon Sep 17 00:00:00 2001 From: Ben Passmore Date: Thu, 9 Nov 2023 20:12:04 +1000 Subject: Added ability to mark articles as read on focus. (#5812) * Added ability to mark entries as read on focus. Feature proposed in issue #5723. * make-fix-all + i18n fr * Use batch to save resources and increase performance * Use "keep_unread" * typo --------- Co-authored-by: Alexandre Alapetite --- p/scripts/main.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'p/scripts') diff --git a/p/scripts/main.js b/p/scripts/main.js index b3876f628..ca52bac56 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -481,6 +481,9 @@ function prev_entry(skipping) { } else { new_active = document.querySelector('.flux'); } + if (context.auto_mark_focus && !new_active.classList.contains('keep_unread')) { + mark_read(new_active, true, true); + } toggleContent(new_active, old_active, skipping); } @@ -496,6 +499,9 @@ function next_entry(skipping) { } else { new_active = document.querySelector('.flux'); } + if (context.auto_mark_focus && !new_active.classList.contains('keep_unread')) { + mark_read(new_active, true, true); + } toggleContent(new_active, old_active, skipping); } @@ -511,6 +517,9 @@ function next_unread_entry(skipping) { } else { new_active = document.querySelector('.not_read'); } + if (context.auto_mark_focus && !new_active.classList.contains('keep_unread')) { + mark_read(new_active, true, true); + } toggleContent(new_active, old_active, skipping); } -- cgit v1.2.3