From 909f70c6e61eabe064a8374ce32c1a35d564a09f Mon Sep 17 00:00:00 2001 From: ccd0 Date: Mon, 6 Feb 2017 18:01:20 -0800 Subject: [PATCH] Remove obsolete code to wait for captcha from Recaptcha v1 noscript version. --- src/Posting/QR.coffee | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/src/Posting/QR.coffee b/src/Posting/QR.coffee index f81c162b8..a47015ae8 100644 --- a/src/Posting/QR.coffee +++ b/src/Posting/QR.coffee @@ -675,31 +675,14 @@ QR = QR.req.progress = "#{Math.round e.loaded / e.total * 100}%" QR.status() - cb = (response) -> - if response? - if response.challenge? - extra.form.append 'recaptcha_challenge_field', response.challenge - extra.form.append 'recaptcha_response_field', response.response - else - extra.form.append 'g-recaptcha-response', response.response - QR.req = $.ajax "https://sys.4chan.org/#{g.BOARD}/post", options, extra - QR.req.progress = '...' - - if typeof captcha is 'function' - # Wait for captcha to be verified before submitting post. - QR.req = - progress: '...' - abort: -> cb = null - captcha (response) -> - if response - cb? response - else - delete QR.req - post.unlock() - QR.cooldown.auto = !!Captcha.cache.getCount() - QR.status() - else - cb captcha + if captcha? + if captcha.challenge? + extra.form.append 'recaptcha_challenge_field', captcha.challenge + extra.form.append 'recaptcha_response_field', captcha.response + else + extra.form.append 'g-recaptcha-response', captcha.response + QR.req = $.ajax "https://sys.4chan.org/#{g.BOARD}/post", options, extra + QR.req.progress = '...' # Starting to upload might take some time. # Provide some feedback that we're starting to submit.