Remove obsolete Recaptcha v1 code and remove dependence on findIndex.

This commit is contained in:
ccd0 2019-08-03 08:56:40 -07:00
parent e75700f5d9
commit 3d079f7e7e

View File

@ -22,11 +22,9 @@ Captcha.cache =
haveCookie: ->
/\b_ct=/.test(d.cookie) and QR.posts[0].thread isnt 'new'
getOne: (isReply) ->
getOne: ->
@clear()
i = @captchas.findIndex((x) -> isReply or !x.challenge?)
if i >= 0
captcha = @captchas.splice(i, 1)[0]
if (captcha = @captchas.shift())
@count()
captcha
else