From 3d8f62abd09c195250f7cd7998ebba536301f515 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Thu, 16 Feb 2012 14:57:12 +0100 Subject: [PATCH] Fix autoposting stopping on incorrect captcha. --- 4chan_x.user.js | 2 +- script.coffee | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index bac801fa4..3400e1927 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1834,7 +1834,7 @@ err = b.firstChild.textContent; } if (err) { - if (err === 'You seem to have mistyped the verification.' || err === 'Connection error with sys.4chan.org.') { + if (/captcha|verification/i.test(err) || err === 'Connection error with sys.4chan.org.') { qr.cooldown.auto = !!$.get('captchas', []).length; qr.cooldown.set(2); } else { diff --git a/script.coffee b/script.coffee index 4158bc8c8..6969b54d1 100644 --- a/script.coffee +++ b/script.coffee @@ -1404,7 +1404,7 @@ qr = err = b.firstChild.textContent if err - if err is 'You seem to have mistyped the verification.' or err is 'Connection error with sys.4chan.org.' + if /captcha|verification/i.test(err) or err is 'Connection error with sys.4chan.org.' # Enable auto-post if we have some cached captchas. qr.cooldown.auto = !!$.get('captchas', []).length # Too many frequent mistyped captchas will auto-ban you!