From 712a15981691855ed090778d1d4b4208abf45c3e Mon Sep 17 00:00:00 2001 From: ccd0 Date: Tue, 17 Nov 2015 21:07:01 -0800 Subject: [PATCH] Update captcha count when captchas expire. --- src/Posting/Captcha.v1.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Posting/Captcha.v1.coffee b/src/Posting/Captcha.v1.coffee index c371bef7e..ea1fd3ade 100644 --- a/src/Posting/Captcha.v1.coffee +++ b/src/Posting/Captcha.v1.coffee @@ -196,6 +196,9 @@ Captcha.v1 = " (#{count} cached captchas)" @nodes.input.placeholder = placeholder @nodes.input.alt = count # For XTRM RICE. + clearTimeout @timer + if count + @timer = setTimeout @clear.bind(@), @captchas[0].timeout - Date.now() reload: (focus) -> # Recaptcha.should_focus = false: Hack to prevent the input from being focused