diff --git a/4chan_x.user.js b/4chan_x.user.js index 6642a2213..163c5153b 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1560,7 +1560,7 @@ }); reply = qr.replies[0]; if (!(reply.com || reply.file)) { - err = 'Error: No file selected.'; + err = 'No file selected.'; } else { captchas = $.get('captchas', []); while ((captcha = captchas[0]) && captcha.time < Date.now()) { @@ -1575,7 +1575,7 @@ } $.set('captchas', captchas); qr.captcha.count(captchas.length); - if (!response) err = 'Error: No valid captcha.'; + if (!response) err = 'No valid captcha.'; } if (err) { qr.error(err); @@ -1628,8 +1628,7 @@ } else if (b.childElementCount) { if (b.firstChild.tagName) node = b.firstChild; err = b.firstChild.textContent; - log(b); - console.dir(b); + if (err === 'You seem to have mistyped the verification.') {} } if (err) { qr.error(err, node); diff --git a/script.coffee b/script.coffee index 6147d003a..080317c09 100644 --- a/script.coffee +++ b/script.coffee @@ -1157,7 +1157,7 @@ qr = # prevent errors unless reply.com or reply.file - err = 'Error: No file selected.' + err = 'No file selected.' else # get oldest valid captcha captchas = $.get 'captchas', [] @@ -1173,7 +1173,7 @@ qr = $.set 'captchas', captchas qr.captcha.count captchas.length unless response - err = 'Error: No valid captcha.' + err = 'No valid captcha.' # more error prevention ? if err @@ -1226,9 +1226,8 @@ qr = else if b.childElementCount # error! node = b.firstChild if b.firstChild.tagName # duplicate image link err = b.firstChild.textContent - log b - console.dir b - # error handling + if err is 'You seem to have mistyped the verification.' + ;# cooldown to prevent autoban if err qr.error err, node