Remove unused queryChallenge code.
This commit is contained in:
parent
289b4f8885
commit
69cf03df4d
@ -39,27 +39,24 @@ Captcha.noscript =
|
|||||||
@setup()
|
@setup()
|
||||||
|
|
||||||
initFrame: ->
|
initFrame: ->
|
||||||
img = $ '.fbc-payload > img'
|
|
||||||
cb = ->
|
|
||||||
canvas = $.el 'canvas'
|
|
||||||
canvas.width = img.width
|
|
||||||
canvas.height = img.height
|
|
||||||
canvas.getContext('2d').drawImage(img, 0, 0)
|
|
||||||
conn.send {challenge: canvas.toDataURL()}
|
|
||||||
sendChallenge = ->
|
|
||||||
if img.complete
|
|
||||||
cb()
|
|
||||||
else
|
|
||||||
$.on img, 'load', cb
|
|
||||||
conn = new Connection window.top, "#{location.protocol}//boards.4chan.org",
|
conn = new Connection window.top, "#{location.protocol}//boards.4chan.org",
|
||||||
queryChallenge: sendChallenge
|
|
||||||
response: (response) ->
|
response: (response) ->
|
||||||
$.id('response').value = response
|
$.id('response').value = response
|
||||||
$('.fbc-challenge > form').submit()
|
$('.fbc-challenge > form').submit()
|
||||||
conn.send
|
conn.send
|
||||||
token: $('.fbc-verification-token > textarea')?.value
|
token: $('.fbc-verification-token > textarea')?.value
|
||||||
error: $('.fbc-error')?.textContent
|
error: $('.fbc-error')?.textContent
|
||||||
sendChallenge() if img
|
return unless img = $ '.fbc-payload > img'
|
||||||
|
cb = ->
|
||||||
|
canvas = $.el 'canvas'
|
||||||
|
canvas.width = img.width
|
||||||
|
canvas.height = img.height
|
||||||
|
canvas.getContext('2d').drawImage(img, 0, 0)
|
||||||
|
conn.send {challenge: canvas.toDataURL()}
|
||||||
|
if img.complete
|
||||||
|
cb()
|
||||||
|
else
|
||||||
|
$.on img, 'load', cb
|
||||||
|
|
||||||
timers: {}
|
timers: {}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user