diff --git a/CHANGELOG.md b/CHANGELOG.md index 81fb35c70..b25e5ed4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +- Added the option `Hide Unread Count at (0)`, disabled by default. + ### 3.1.4 - *2013-04-17* - Fix QR remembering the file spoiler state when it shouldn't, for real this time. diff --git a/src/config.coffee b/src/config.coffee index 1be799305..b59267a25 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -40,6 +40,7 @@ Config = 'Monitoring': 'Thread Updater': [true, 'Fetch and insert new replies. Has more options in its own dialog.'] 'Unread Count': [true, 'Show the unread posts count in the tab title.'] + 'Hide Unread Count at (0)': [false, 'Hide the unread posts count when it reaches 0.'] 'Unread Tab Icon': [true, 'Show a different favicon when there are unread posts.'] 'Unread Line': [true, 'Show a line to distinguish read posts from unread ones.'] 'Scroll to Last Read Post': [true, 'Scroll back to the last read post when reopening a thread.'] diff --git a/src/features.coffee b/src/features.coffee index 212b921c5..fb332c691 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -3865,10 +3865,7 @@ Unread = count = Unread.posts.length if Conf['Unread Count'] - d.title = if g.DEAD - "(#{Unread.posts.length}) /#{g.BOARD}/ - 404" - else - "(#{Unread.posts.length}) #{Unread.title}" + d.title = "#{if count or !Conf['Hide Unread Count at (0)'] then "(#{count}) " else ''}#{if g.DEAD then "/#{g.BOARD}/ - 404" else "#{Unread.title}"}" <% if (type === 'crx') { %> # XXX Chrome bug where it doesn't always update the tab title. # crbug.com/124381