From 8a4cdb7d09f37e25bd54bb02d1af787b87c63484 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Tue, 24 Jan 2012 09:33:05 +0100 Subject: [PATCH] 0 cached captchas. 1 cached captcha. 2 cached catpchas. --- 4chan_x.user.js | 4 +++- script.coffee | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index cae944472..4cc224270 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1451,7 +1451,9 @@ return this.input.value = null; }, count: function(count) { - return this.input.placeholder = "Verification (" + count + " cached captchas)"; + var s; + s = count === 1 ? '' : 's'; + return this.input.placeholder = "Verification (" + count + " cached captcha" + s + ")"; }, reload: function() { window.location = 'javascript:Recaptcha.reload()'; diff --git a/script.coffee b/script.coffee index 4abae5e50..d2d9e2053 100644 --- a/script.coffee +++ b/script.coffee @@ -1072,7 +1072,8 @@ qr = @img.src = "http://www.google.com/recaptcha/api/image?c=#{challenge}" @input.value = null count: (count) -> - @input.placeholder = "Verification (#{count} cached captchas)" + s = if count is 1 then '' else 's' + @input.placeholder = "Verification (#{count} cached captcha#{s})" reload: -> window.location = 'javascript:Recaptcha.reload()' qr.captcha.input.focus()