From ed3dbfd9880c8c781f3a3080695e55edcc21fc89 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sun, 23 Sep 2012 01:06:27 +0200 Subject: [PATCH] Don't stop auto-posting on connection error. --- 4chan_x.user.js | 2 +- script.coffee | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 066b51e63..6b4466df2 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2515,7 +2515,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 a08ba0713..8774dde25 100644 --- a/script.coffee +++ b/script.coffee @@ -1958,7 +1958,11 @@ 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 + !!$.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