more captcha fixes
This commit is contained in:
parent
c5375ca931
commit
509bc51370
@ -84,7 +84,8 @@ QR.captcha =
|
|||||||
$.set 'captchas', @captchas
|
$.set 'captchas', @captchas
|
||||||
else
|
else
|
||||||
challenge = @nodes.img.alt
|
challenge = @nodes.img.alt
|
||||||
if response = @nodes.input.value then @destroy()
|
if response = @nodes.input.value
|
||||||
|
if Conf['Auto-load captcha'] then @reload() else @destroy()
|
||||||
if response
|
if response
|
||||||
response = response.trim()
|
response = response.trim()
|
||||||
# one-word-captcha:
|
# one-word-captcha:
|
||||||
|
|||||||
@ -123,6 +123,8 @@ QR =
|
|||||||
post.delete()
|
post.delete()
|
||||||
QR.cooldown.auto = false
|
QR.cooldown.auto = false
|
||||||
QR.status()
|
QR.status()
|
||||||
|
if QR.captcha.isEnabled and not Conf['Auto-load captcha']
|
||||||
|
QR.captcha.destroy()
|
||||||
focusin: ->
|
focusin: ->
|
||||||
$.addClass QR.nodes.el, 'focus'
|
$.addClass QR.nodes.el, 'focus'
|
||||||
focusout: ->
|
focusout: ->
|
||||||
@ -148,9 +150,10 @@ QR =
|
|||||||
el = err
|
el = err
|
||||||
el.removeAttribute 'style'
|
el.removeAttribute 'style'
|
||||||
if QR.captcha.isEnabled and /captcha|verification/i.test el.textContent
|
if QR.captcha.isEnabled and /captcha|verification/i.test el.textContent
|
||||||
# Focus the captcha input on captcha error.
|
if QR.captcha.captchas.length is 0
|
||||||
QR.captcha.nodes.input.focus()
|
# Focus the captcha input on captcha error.
|
||||||
QR.captcha.setup()
|
QR.captcha.nodes.input.focus()
|
||||||
|
QR.captcha.setup()
|
||||||
if Conf['Captcha Warning Notifications'] and !d.hidden
|
if Conf['Captcha Warning Notifications'] and !d.hidden
|
||||||
QR.notify el
|
QR.notify el
|
||||||
else
|
else
|
||||||
@ -807,7 +810,7 @@ QR =
|
|||||||
unless Conf['Persistent QR'] or QR.cooldown.auto
|
unless Conf['Persistent QR'] or QR.cooldown.auto
|
||||||
QR.close()
|
QR.close()
|
||||||
else
|
else
|
||||||
if QR.posts.length > 1
|
if QR.posts.length > 1 and QR.captcha.isEnabled and QR.captcha.captchas.length is 0
|
||||||
QR.captcha.setup()
|
QR.captcha.setup()
|
||||||
post.rm()
|
post.rm()
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user