Prevent noscript captcha submission when no checkboxes are checked.

Google gives an obnoxious error page instead of reloading in this case.
This commit is contained in:
ccd0 2015-06-20 19:53:20 -07:00
parent d8ba3e1708
commit cde281cdf6

View File

@ -55,6 +55,10 @@ Captcha.fixes =
$.addStyle @cssNoscript
@addLabels()
$.on d, 'keydown', @keybinds.bind(@)
$.on $('.fbc-imageselect-challenge > form'), 'submit', (e) =>
n = 0
n++ for checkbox in @images when checkbox.checked
e.preventDefault() if n is 0
fixImages: ->
@images = $$ '.rc-imageselect-target > div'