Remove obsolete Recaptcha v1 code and remove dependence on findIndex.
This commit is contained in:
parent
e75700f5d9
commit
3d079f7e7e
@ -22,11 +22,9 @@ Captcha.cache =
|
|||||||
haveCookie: ->
|
haveCookie: ->
|
||||||
/\b_ct=/.test(d.cookie) and QR.posts[0].thread isnt 'new'
|
/\b_ct=/.test(d.cookie) and QR.posts[0].thread isnt 'new'
|
||||||
|
|
||||||
getOne: (isReply) ->
|
getOne: ->
|
||||||
@clear()
|
@clear()
|
||||||
i = @captchas.findIndex((x) -> isReply or !x.challenge?)
|
if (captcha = @captchas.shift())
|
||||||
if i >= 0
|
|
||||||
captcha = @captchas.splice(i, 1)[0]
|
|
||||||
@count()
|
@count()
|
||||||
captcha
|
captcha
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user