From 019ac5733d37fc7170d2c66c62e331ecf4cc3129 Mon Sep 17 00:00:00 2001 From: ccd0 Date: Wed, 24 Jun 2015 21:55:44 -0700 Subject: [PATCH] Support toggling captcha with space bar. --- src/Posting/Captcha.v2.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Posting/Captcha.v2.coffee b/src/Posting/Captcha.v2.coffee index c3a67e675..c0d819472 100644 --- a/src/Posting/Captcha.v2.coffee +++ b/src/Posting/Captcha.v2.coffee @@ -26,6 +26,11 @@ Captcha.v2 = $.after QR.nodes.com.parentNode, root $.on counter, 'click', @toggle.bind @ + $.on counter, 'keydown', (e) => + return unless Keybinds.keyCode(e) is 'Space' + @toggle() + e.preventDefault() + e.stopPropagation() $.on window, 'captcha:success', => # XXX Greasemonkey 1.x workaround to gain access to GM_* functions. $.queueTask => @save false