Remove the 4chan Pass ad in mistyped captcha errors.

This commit is contained in:
Nicolas Stepien 2012-09-26 16:39:53 +02:00
parent 6ce4c2abbd
commit 6e8d4b02de
3 changed files with 7 additions and 0 deletions

View File

@ -2515,6 +2515,9 @@
} }
if (err) { if (err) {
if (/captcha|verification/i.test(err.textContent) || err === 'Connection error with sys.4chan.org.') { if (/captcha|verification/i.test(err.textContent) || err === 'Connection error with sys.4chan.org.') {
if (/mistyped/i.test(err.textContent)) {
err.textContent = 'Error: You seem to have mistyped the CAPTCHA.';
}
QR.cooldown.auto = QR.captchaIsEnabled ? !!$.get('captchas', []).length : true; QR.cooldown.auto = QR.captchaIsEnabled ? !!$.get('captchas', []).length : true;
QR.cooldown.set(2); QR.cooldown.set(2);
} else { } else {

View File

@ -1,5 +1,6 @@
master master
- Mayhem - Mayhem
Removed the obnoxious 4chan Pass ad in captcha errors when posting.
Fix 'Administrator/Moderator/Developer Replies' creating extra backlinks on /q/, again. Fix 'Administrator/Moderator/Developer Replies' creating extra backlinks on /q/, again.
2.35.3 2.35.3

View File

@ -1957,6 +1957,9 @@ QR =
if err if err
if /captcha|verification/i.test(err.textContent) or err is 'Connection error with sys.4chan.org.' if /captcha|verification/i.test(err.textContent) or err is 'Connection error with sys.4chan.org.'
# Remove the obnoxious 4chan Pass ad.
if /mistyped/i.test err.textContent
err.textContent = 'Error: You seem to have mistyped the CAPTCHA.'
# Enable auto-post if we have some cached captchas. # Enable auto-post if we have some cached captchas.
QR.cooldown.auto = QR.cooldown.auto =
if QR.captchaIsEnabled if QR.captchaIsEnabled