diff --git a/CHANGELOG.md b/CHANGELOG.md index b95641c98..904b7595a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +- Added the `Deselect reply` keybind. + ## 3.5.0 - *2013-05-26* - The Thread Stats counters now include the number of the page where the thread is. diff --git a/src/General/Config.coffee b/src/General/Config.coffee index 59f7230ad..f7a1e24e4 100644 --- a/src/General/Config.coffee +++ b/src/General/Config.coffee @@ -153,7 +153,7 @@ Config = usercss: '' hotkeys: # Header, QR & Options - 'Toggle board list': ['Ctrl+b', 'Toggle the full board list.'] + 'Toggle board list': ['Ctrl+b', 'Toggle the full board list.'] 'Open empty QR': ['q', 'Open QR without post number inserted.'] 'Open QR': ['Shift+q', 'Open QR with post number inserted.'] 'Open settings': ['Alt+o', 'Open Settings.'] @@ -183,6 +183,7 @@ Config = # Reply Navigation 'Next reply': ['j', 'Select next reply.'] 'Previous reply': ['k', 'Select previous reply.'] + 'Deselect reply': ['Shift+d', 'Deselect reply.'] 'Hide': ['x', 'Hide thread.'] updater: checkbox: diff --git a/src/Miscellaneous/Keybinds.coffee b/src/Miscellaneous/Keybinds.coffee index e264120d6..7f33b2b74 100644 --- a/src/Miscellaneous/Keybinds.coffee +++ b/src/Miscellaneous/Keybinds.coffee @@ -91,6 +91,8 @@ Keybinds = Keybinds.hl +1, threadRoot when Conf['Previous reply'] Keybinds.hl -1, threadRoot + when Conf['Deselect reply'] + Keybinds.hl 0, threadRoot when Conf['Hide'] ThreadHiding.toggle thread if g.VIEW is 'index' else @@ -166,6 +168,10 @@ Keybinds = location.href = url hl: (delta, thread) -> + unless delta + if postEl = $ '.reply.highlight', thread + $.rmClass postEl, 'highlight' + return if Conf['Bottom header'] topMargin = 0 else