Support toggling captcha with space bar.

This commit is contained in:
ccd0 2015-06-24 21:55:44 -07:00
parent b67d7cf905
commit 019ac5733d

View File

@ -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