From 6969f4a8cf02d4ffff13df852743ba50ccfc7960 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Mon, 5 Nov 2018 13:01:48 -0800 Subject: [PATCH] Don't show unread line in index when last read post is OP and some posts are omitted. --- src/Monitoring/UnreadIndex.coffee | 2 +- src/site/SW.tinyboard.coffee | 1 + src/site/SW.yotsuba.coffee | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Monitoring/UnreadIndex.coffee b/src/Monitoring/UnreadIndex.coffee index 5a97d32d2..7490289c7 100644 --- a/src/Monitoring/UnreadIndex.coffee +++ b/src/Monitoring/UnreadIndex.coffee @@ -64,7 +64,7 @@ UnreadIndex = firstUnread = post hr = UnreadIndex.hr[thread.fullID] - if firstUnread and (repliesRead or lastReadPost is thread.OP.ID) + if firstUnread and (repliesRead or (lastReadPost is thread.OP.ID and (!$(Site.selectors.summary, thread.nodes.root) or thread.ID of ExpandThread.statuses))) if !hr hr = UnreadIndex.hr[thread.fullID] = $.el 'hr', className: 'unread-line' diff --git a/src/site/SW.tinyboard.coffee b/src/site/SW.tinyboard.coffee index dd1c4cd57..50d84712e 100644 --- a/src/site/SW.tinyboard.coffee +++ b/src/site/SW.tinyboard.coffee @@ -54,6 +54,7 @@ SW.tinyboard = board: 'form[name="postcontrols"]' thread: 'div[id^="thread_"]' threadDivider: 'div[id^="thread_"] > hr:last-of-type' + summary: '.omitted' postContainer: '.reply' # postContainer is thread for OP infoRoot: '.intro' info: diff --git a/src/site/SW.yotsuba.coffee b/src/site/SW.yotsuba.coffee index 6dc574b84..c22058342 100644 --- a/src/site/SW.yotsuba.coffee +++ b/src/site/SW.yotsuba.coffee @@ -8,6 +8,7 @@ SW.yotsuba = board: '.board' thread: '.thread' threadDivider: '.board > hr' + summary: '.summary' postContainer: '.postContainer' sideArrows: '.sideArrows' post: '.post'