From 6cd4d222155be6acf544817ba23d17e7d6b56071 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Tue, 19 Feb 2013 19:52:08 +0100 Subject: [PATCH] Fix stray unread code. --- 4chan_x.user.js | 2 +- src/features.coffee | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 528990542..db6800176 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -4598,7 +4598,7 @@ var count; count = Unread.posts.length; if (Conf['Unread Count']) { - d.title = "(" + Unread.posts.length + ") " + Unread.title; + d.title = g.DEAD ? "(" + Unread.posts.length + ") /" + g.BOARD + "/ - 404" : "(" + Unread.posts.length + ") " + Unread.title; } if (!Conf['Unread Tab Icon']) { return; diff --git a/src/features.coffee b/src/features.coffee index 4c51013c6..21e26b0c0 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -2928,7 +2928,10 @@ Unread = count = Unread.posts.length if Conf['Unread Count'] - d.title = "(#{Unread.posts.length}) #{Unread.title}" + d.title = if g.DEAD + "(#{Unread.posts.length}) /#{g.BOARD}/ - 404" + else + "(#{Unread.posts.length}) #{Unread.title}" return unless Conf['Unread Tab Icon'] @@ -3138,11 +3141,6 @@ ThreadUpdater = $.event 'ThreadUpdate', 404: true thread: ThreadUpdater.thread - # if Conf['Unread Count'] - # Unread.title = Unread.title.match(/^.+-/)[0] + ' 404' - # else - # d.title = d.title.match(/^.+-/)[0] + ' 404' - # Unread.update true else ThreadUpdater.outdateCount++ ThreadUpdater.set 'timer', ThreadUpdater.getInterval()