From 239bcc25c8af3abc7d9cbdda06268977ee72cb29 Mon Sep 17 00:00:00 2001 From: James Campos Date: Sat, 6 Aug 2011 19:22:28 -0700 Subject: [PATCH] captcha cached --- 4chan_x.user.js | 8 +++++--- script.coffee | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index d6eaa7c78..2fc09467c 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1257,7 +1257,7 @@ if (!responseField.value && (captcha = qr.captcha.shift())) { $('#recaptcha_challenge_field', qr.el).value = captcha.challenge; responseField.value = captcha.response; - responseField.nextSibling.textContent = qr.captcha.length; + responseField.nextSibling.textContent = qr.captcha.length + ' captcha cached'; } return qr.submit.call($('form', qr.el)); }, @@ -1290,7 +1290,7 @@ THREAD_ID = g.THREAD_ID || $.x('ancestor::div[@class="thread"]/div', link).id; spoiler = $('.postarea label') ? '' : ''; challenge = $('#recaptcha_challenge_field').value; - html = " X
Quick Reply
" + spoiler + "
0
attach another file
"; + html = " X
Quick Reply
" + spoiler + "
0 captcha cached
attach another file
"; qr.el = ui.dialog('qr', { top: '0px', left: '0px' @@ -1347,10 +1347,12 @@ return $.bind(quote, 'click', qr.quote); }, push: function() { - this.nextSibling.textContent = qr.captcha.push({ + var l; + l = qr.captcha.push({ challenge: $('#recaptcha_challenge_field', qr.el).value, response: this.value }); + this.nextSibling.textContent = l + ' captcha cached'; Recaptcha.reload(); return this.value = ''; }, diff --git a/script.coffee b/script.coffee index cc84430da..e08b51d98 100644 --- a/script.coffee +++ b/script.coffee @@ -997,7 +997,7 @@ qr = if !responseField.value and captcha = qr.captcha.shift() $('#recaptcha_challenge_field', qr.el).value = captcha.challenge responseField.value = captcha.response - responseField.nextSibling.textContent = qr.captcha.length + responseField.nextSibling.textContent = qr.captcha.length + ' captcha cached' qr.submit.call $ 'form', qr.el captchaNode: (e) -> @@ -1037,7 +1037,7 @@ qr =
-
0
+
0 captcha cached
attach another file
@@ -1092,9 +1092,10 @@ qr = $.bind quote, 'click', qr.quote push: -> - @nextSibling.textContent = qr.captcha.push + l = qr.captcha.push challenge: $('#recaptcha_challenge_field', qr.el).value response: @value + @nextSibling.textContent = l + ' captcha cached' Recaptcha.reload() @value = ''