A free, self-hostable news aggregator…
Fix autoremove again (#2352)
Alexandre Alapetite43e3a2d69dc6
diff --git a/p/scripts/main.js b/p/scripts/main.jsindex 286764d22..a44a22c6a 100644--- a/p/scripts/main.js+++ b/p/scripts/main.js@@ -163,6 +163,9 @@ function incUnreadsTag(tag_id, nb) {}function removeArticle(div) {+ if (!div || div.classList.contains('active') || div.classList.contains('not_read')) {+ return;+ }let scrollTop = box_to_follow.scrollTop;let dirty = false;const p = div.previousElementSibling,@@ -384,6 +387,9 @@ function toggleContent(new_active, old_active, skipping) {if (old_active) {old_active.classList.remove('active');old_active.classList.remove('current'); //Split for IE11+ if (context.auto_remove_article) {+ removeArticle(old_active);+ }}} else {new_active.classList.toggle('active');