From de9d2f1129ab909e4c422fbabe6fe060635b0269 Mon Sep 17 00:00:00 2001 From: James Campos Date: Wed, 10 Aug 2011 10:07:58 -0700 Subject: [PATCH] don't store blank captchas --- 4chan_x.user.js | 2 +- script.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index b10c37f0d..2159cb45e 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1264,7 +1264,7 @@ }, captchaKeydown: function(e) { var blank; - if (e.keyCode !== 13) { + if (!(e.keyCode === 13 && this.value)) { return; } blank = !$('textarea', qr.el).value && !$('input[type=file]', qr.el).files.length; diff --git a/script.coffee b/script.coffee index efe1ecb59..1edc6b2fa 100644 --- a/script.coffee +++ b/script.coffee @@ -997,7 +997,7 @@ qr = $('#recaptcha_challenge_field', qr.el).value = target.value captchaKeydown: (e) -> - return unless e.keyCode is 13 #enter + return unless e.keyCode is 13 and @value #enter blank = !$('textarea', qr.el).value and !$('input[type=file]', qr.el).files.length return unless blank or cooldown.duration