RecaptchaState.timeout is giving the correct value again. The Recaptcha script is refreshing the captcha every 4 minutes, we don't have refresh it on your side too.
This commit is contained in:
parent
2728129d05
commit
7d3a687b5a
@ -1855,9 +1855,7 @@
|
|||||||
challenge = this.challenge.firstChild.value;
|
challenge = this.challenge.firstChild.value;
|
||||||
this.img.alt = challenge;
|
this.img.alt = challenge;
|
||||||
this.img.src = "//www.google.com/recaptcha/api/image?c=" + challenge;
|
this.img.src = "//www.google.com/recaptcha/api/image?c=" + challenge;
|
||||||
this.input.value = null;
|
return this.input.value = null;
|
||||||
clearTimeout(this.timeoutID);
|
|
||||||
return this.timeoutID = setTimeout(this.reload, 4 * $.MINUTE);
|
|
||||||
},
|
},
|
||||||
count: function(count) {
|
count: function(count) {
|
||||||
this.input.placeholder = (function() {
|
this.input.placeholder = (function() {
|
||||||
|
|||||||
@ -1373,18 +1373,13 @@ QR =
|
|||||||
@count captchas.length
|
@count captchas.length
|
||||||
@reload()
|
@reload()
|
||||||
load: ->
|
load: ->
|
||||||
# Timeout was available at RecaptchaState.timeout in seconds.
|
# Timeout is available at RecaptchaState.timeout in seconds.
|
||||||
# Timeout is now set by moot: 5 minutes.
|
|
||||||
# We use 5-1 minutes to give upload some time.
|
# We use 5-1 minutes to give upload some time.
|
||||||
@timeout = Date.now() + 4*$.MINUTE
|
@timeout = Date.now() + 4*$.MINUTE
|
||||||
challenge = @challenge.firstChild.value
|
challenge = @challenge.firstChild.value
|
||||||
@img.alt = challenge
|
@img.alt = challenge
|
||||||
@img.src = "//www.google.com/recaptcha/api/image?c=#{challenge}"
|
@img.src = "//www.google.com/recaptcha/api/image?c=#{challenge}"
|
||||||
@input.value = null
|
@input.value = null
|
||||||
# Refresh captchas every 4 minutes to avoid filling perished ones.
|
|
||||||
# This used to be done by the recaptcha script, but it doesn't take into account moot's custom value.
|
|
||||||
clearTimeout @timeoutID
|
|
||||||
@timeoutID = setTimeout @reload, 4*$.MINUTE
|
|
||||||
count: (count) ->
|
count: (count) ->
|
||||||
@input.placeholder = switch count
|
@input.placeholder = switch count
|
||||||
when 0
|
when 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user