diff --git a/4chan_x.user.js b/4chan_x.user.js index ab57c29c2..c222c4bcf 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -133,7 +133,8 @@ hide: 'x', expandImages: 'm', expandAllImages: 'M', - update: 'u' + update: 'u', + UnreadCountTo0: 'r' }, updater: { checkbox: { @@ -821,6 +822,11 @@ $('.postarea form').submit(); } break; + case conf.UnreadCountTo0: + unread.replies.length = 0; + unread.updateTitle(); + Favicon.update(); + break; default: return; } @@ -1030,7 +1036,7 @@ var arr, checked, description, dialog, hiddenNum, hiddenThreads, hidingul, html, input, key, li, link, main, obj, overlay, ul, _i, _j, _k, _len, _len2, _len3, _ref, _ref2, _ref3, _ref4; hiddenThreads = $.getValue("hiddenThreads/" + g.BOARD + "/", {}); hiddenNum = Object.keys(g.hiddenReplies).length + Object.keys(hiddenThreads).length; - html = "

"; + html = "

"; dialog = $.el('div', { id: 'options', innerHTML: html diff --git a/changelog b/changelog index ad2702f1b..63e918021 100644 --- a/changelog +++ b/changelog @@ -2,6 +2,7 @@ github - mayhem: - Make updater's settings dynamic - Multi-line quoting + - New Unread Count reset keybind - fix remember updater's interval settings - fix wrong keybind input in options - fix time preview diff --git a/script.coffee b/script.coffee index 648dff99e..2e4563033 100644 --- a/script.coffee +++ b/script.coffee @@ -71,6 +71,7 @@ config = expandImages: 'm' expandAllImages: 'M' update: 'u' + UnreadCountTo0: 'r' updater: checkbox: 'Scrolling': [false, 'Scroll updated posts into view. Only enabled at bottom of page.'] @@ -584,6 +585,10 @@ keybinds = qr.submit.call $ 'form', qr.el else $('.postarea form').submit() + when conf.UnreadCountTo0 + unread.replies.length = 0 + unread.updateTitle() + Favicon.update() else return e.preventDefault() @@ -818,6 +823,7 @@ options = Expand selected image Expand all images Update now + Reset the unread count to 0