From 9d6232ec53e2fb65e5a81471fedbb817fdc5bdac Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Tue, 18 Sep 2012 18:39:48 +0200 Subject: [PATCH] Some qr.captchaIsEnabled here and there. --- 4chan_x.user.js | 4 ++-- script.coffee | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index d1e39bf0b..905dcffbd 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1803,7 +1803,7 @@ $.add(el, err); } QR.open(); - if (/captcha|verification/i.test(el.textContent)) { + if (qr.captchaIsEnabled && /captcha|verification/i.test(el.textContent)) { $('[autocomplete]', QR.el).focus(); } if (d.hidden || d.oHidden || d.mozHidden || d.webkitHidden) { @@ -2511,7 +2511,7 @@ } if (err) { if (/captcha|verification/i.test(err.textContent) || err === 'Connection error with sys.4chan.org.') { - QR.cooldown.auto = !!$.get('captchas', []).length; + QR.cooldown.auto = qr.captchaIsEnabled ? !!$.get('captchas', []).length : true; QR.cooldown.set(2); } else { QR.cooldown.auto = false; diff --git a/script.coffee b/script.coffee index 8eac9cb07..0804e4f1c 100644 --- a/script.coffee +++ b/script.coffee @@ -1392,7 +1392,7 @@ QR = el.innerHTML = null $.add el, err QR.open() - if /captcha|verification/i.test el.textContent + if qr.captchaIsEnabled and /captcha|verification/i.test el.textContent # Focus the captcha input on captcha error. $('[autocomplete]', QR.el).focus() alert el.textContent if d.hidden or d.oHidden or d.mozHidden or d.webkitHidden @@ -1956,7 +1956,7 @@ QR = if err if /captcha|verification/i.test(err.textContent) or err is 'Connection error with sys.4chan.org.' # Enable auto-post if we have some cached captchas. - QR.cooldown.auto = !!$.get('captchas', []).length + QR.cooldown.auto = if qr.captchaIsEnabled then !!$.get('captchas', []).length else true # Too many frequent mistyped captchas will auto-ban you! # On connection error, the post most likely didn't go through. QR.cooldown.set 2