Remove obsolete code to wait for captcha from Recaptcha v1 noscript version.
This commit is contained in:
parent
e09f451029
commit
909f70c6e6
@ -675,31 +675,14 @@ QR =
|
|||||||
QR.req.progress = "#{Math.round e.loaded / e.total * 100}%"
|
QR.req.progress = "#{Math.round e.loaded / e.total * 100}%"
|
||||||
QR.status()
|
QR.status()
|
||||||
|
|
||||||
cb = (response) ->
|
if captcha?
|
||||||
if response?
|
if captcha.challenge?
|
||||||
if response.challenge?
|
extra.form.append 'recaptcha_challenge_field', captcha.challenge
|
||||||
extra.form.append 'recaptcha_challenge_field', response.challenge
|
extra.form.append 'recaptcha_response_field', captcha.response
|
||||||
extra.form.append 'recaptcha_response_field', response.response
|
else
|
||||||
else
|
extra.form.append 'g-recaptcha-response', captcha.response
|
||||||
extra.form.append 'g-recaptcha-response', response.response
|
QR.req = $.ajax "https://sys.4chan.org/#{g.BOARD}/post", options, extra
|
||||||
QR.req = $.ajax "https://sys.4chan.org/#{g.BOARD}/post", options, extra
|
QR.req.progress = '...'
|
||||||
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
|
|
||||||
|
|
||||||
# Starting to upload might take some time.
|
# Starting to upload might take some time.
|
||||||
# Provide some feedback that we're starting to submit.
|
# Provide some feedback that we're starting to submit.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user