From 75920efb25eff64de2aab86f221687927b217bbf Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sun, 24 Jul 2011 17:58:43 +0200 Subject: [PATCH 1/2] Multi-line quoting, close #199 --- 4chan_x.user.js | 1 + changelog | 1 + script.coffee | 1 + 3 files changed, 3 insertions(+) diff --git a/4chan_x.user.js b/4chan_x.user.js index 3264bb062..ab57c29c2 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1324,6 +1324,7 @@ if (s = selection.toString()) { selectionID = (_ref = $.x('preceding::input[@type="checkbox"][1]', selection.anchorNode)) != null ? _ref.name : void 0; if (selectionID === id) { + s = s.replace(/\n/g, '\n>'); text += ">" + s + "\n"; } } diff --git a/changelog b/changelog index f81eebade..ad2702f1b 100644 --- a/changelog +++ b/changelog @@ -1,6 +1,7 @@ github - mayhem: - Make updater's settings dynamic + - Multi-line quoting - fix remember updater's interval settings - fix wrong keybind input in options - fix time preview diff --git a/script.coffee b/script.coffee index 914bd8dd3..648dff99e 100644 --- a/script.coffee +++ b/script.coffee @@ -1039,6 +1039,7 @@ qr = if s = selection.toString() selectionID = $.x('preceding::input[@type="checkbox"][1]', selection.anchorNode)?.name if selectionID == id + s = s.replace /\n/g, '\n>' text += ">#{s}\n" ta = $ 'textarea', qr.el From 9d8f4ee2b53692cf42ff44411f05a7aedfa86df0 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sun, 24 Jul 2011 18:27:10 +0200 Subject: [PATCH 2/2] Unread Count reset keybind, close #197 --- 4chan_x.user.js | 10 ++++++++-- changelog | 1 + script.coffee | 6 ++++++ 3 files changed, 15 insertions(+), 2 deletions(-) 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