Need more captchas or captcha error -> focus on captcha iframe
This commit is contained in:
parent
0e916592d8
commit
145dc078a5
@ -49,12 +49,12 @@ QR.captcha =
|
||||
if @occupied()
|
||||
@destroy()
|
||||
else
|
||||
@shouldFocus = true
|
||||
@setup true
|
||||
@setup true, true
|
||||
|
||||
setup: (force) ->
|
||||
setup: (focus, force) ->
|
||||
return unless @isEnabled and (@needed() or force)
|
||||
$.addClass QR.nodes.el, 'captcha-open'
|
||||
@shouldFocus = true if focus
|
||||
if @timeouts.destroy
|
||||
clearTimeout @timeouts.destroy
|
||||
delete @timeouts.destroy
|
||||
@ -129,7 +129,7 @@ QR.captcha =
|
||||
@captchas = @captchas[i..]
|
||||
@count()
|
||||
$.set 'captchas', @captchas
|
||||
@setup()
|
||||
@setup true
|
||||
|
||||
count: ->
|
||||
@nodes.counter.textContent = "Captchas: #{@captchas.length}"
|
||||
|
||||
@ -145,7 +145,7 @@ QR =
|
||||
el = err
|
||||
el.removeAttribute 'style'
|
||||
if QR.captcha.isEnabled and /captcha|verification/i.test el.textContent
|
||||
QR.captcha.setup()
|
||||
QR.captcha.setup true
|
||||
QR.notify el
|
||||
alert el.textContent if d.hidden
|
||||
|
||||
@ -791,7 +791,7 @@ QR =
|
||||
QR.close()
|
||||
else
|
||||
post.rm()
|
||||
QR.captcha.setup()
|
||||
QR.captcha.setup true
|
||||
|
||||
QR.cooldown.add req.uploadEndTime, threadID, postID
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user