From b5d9d3bf1c84caec7c9aed3e8c736f00f6cb93af Mon Sep 17 00:00:00 2001 From: James Campos Date: Sat, 9 Oct 2010 00:15:57 -0700 Subject: [PATCH] reload captcha AFTER removing qr --- 4chan_x.coffee | 4 ++-- 4chan_x.js | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/4chan_x.coffee b/4chan_x.coffee index 06e6e5a14..22f70a892 100644 --- a/4chan_x.coffee +++ b/4chan_x.coffee @@ -416,8 +416,6 @@ iframeLoad = -> return $('iframe').src = 'about:blank' - window.location = 'javascript:Recaptcha.reload()' - qr = $('#qr') if error = GM_getValue('error') $('form', qr).style.visibility = '' @@ -429,6 +427,8 @@ iframeLoad = -> else unless getConfig('Persistent QR') and REPLY remove qr + window.location = 'javascript:Recaptcha.reload()' + submit = (e) -> if span = @nextSibling diff --git a/4chan_x.js b/4chan_x.js index e751c7c70..b9c35b401 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -456,7 +456,6 @@ return null; } $('iframe').src = 'about:blank'; - window.location = 'javascript:Recaptcha.reload()'; qr = $('#qr'); if (error = GM_getValue('error')) { $('form', qr).style.visibility = ''; @@ -464,10 +463,13 @@ textContent: error, className: 'error' }); - return qr.appendChild(span); + qr.appendChild(span); } else { - return !(getConfig('Persistent QR') && REPLY) ? remove(qr) : null; + if (!(getConfig('Persistent QR') && REPLY)) { + remove(qr); + } } + return (window.location = 'javascript:Recaptcha.reload()'); }; submit = function(e) { var _ref2, _ref3, recaptcha, span;