From ca265fc7a18bfbdb8471bc5d16da5ba21376a495 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sat, 23 Feb 2013 01:00:51 +0100 Subject: [PATCH] The file stats won't go red anymore in stickies. --- 4chan_x.user.js | 5 +++-- changelog | 5 ++++- src/features.coffee | 6 +++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index e548ea9b5..980701f30 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -5088,7 +5088,7 @@ return $.add(d.body, ThreadStats.dialog); }, update: function() { - var ID, fileCount, post, postCount, _ref; + var ID, fileCount, funk, post, postCount, _ref; postCount = 0; fileCount = 0; _ref = ThreadStats.thread.posts; @@ -5105,7 +5105,8 @@ } ThreadStats.postCountEl.textContent = postCount; ThreadStats.fileCountEl.textContent = fileCount; - return (fileCount > ThreadStats.fileLimit ? $.addClass : $.rmClass)(ThreadStats.fileCountEl, 'warning'); + funk = ThreadStats.isSticky || fileCount <= ThreadStats.fileLimit ? $.rmClass : $.addClass; + return funk(ThreadStats.fileCountEl, 'warning'); } }; diff --git a/changelog b/changelog index c5bc5fa05..adbd8df91 100644 --- a/changelog +++ b/changelog @@ -28,13 +28,16 @@ beta Read posts won't be marked as unread after reloading a thread. Visible posts will not be taken into account towards the unread count. + Thread Stats changes: + Post and file count will now adjust with deleted posts. + The file count will not go red anymore when the thread is a sticky. + Thread/Post Hiding changes: Added Thread & Post Hiding in the Menu, with individual settings. Thread & Post Hiding Buttons can now be disabled in the settings. Recursive Hiding will be automatically applied when manually hiding a post. Added touch and multi-touch support for dragging windows. - Thread Stats post and file count will adjust with deleted posts. Added [math] tags keybind. Fix Chrome's install warning saying that 4chan X would execute on all domains. Fix Quote Backlinks not affecting inlined quotes. diff --git a/src/features.coffee b/src/features.coffee index 1b28dedeb..6aaf18f0d 100644 --- a/src/features.coffee +++ b/src/features.coffee @@ -3427,7 +3427,11 @@ ThreadStats = fileCount++ ThreadStats.postCountEl.textContent = postCount ThreadStats.fileCountEl.textContent = fileCount - (if fileCount > ThreadStats.fileLimit then $.addClass else $.rmClass) ThreadStats.fileCountEl, 'warning' + funk = if ThreadStats.isSticky or fileCount <= ThreadStats.fileLimit + $.rmClass + else + $.addClass + funk ThreadStats.fileCountEl, 'warning' ThreadUpdater = init: ->