diff --git a/4chan_x.user.js b/4chan_x.user.js index 23e0c5b50..4e8164073 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1683,7 +1683,7 @@ upfile: reply.file, spoiler: reply.spoiler, mode: 'regist', - pwd: (m = d.cookie.match(/4chan_pass=([^;]+)/)) ? decodeURIComponent(m[1]) : $('input[name=pwd]').value, + pwd: (m = d.cookie.match(/4chan_pass=([^;]+)/)) ? decodeURIComponent(m[1]) : $('[name=pwd]').value, recaptcha_challenge_field: challenge, recaptcha_response_field: response }; @@ -1729,7 +1729,6 @@ qr.error(err, node); return; } - qr.status(); reply = qr.replies[0]; persona = $.get('qr.persona', {}); persona = { @@ -1753,6 +1752,7 @@ } else { qr.close(); } + qr.status(); return qr.resetFileInput(); }, message: { diff --git a/script.coffee b/script.coffee index 44484baf3..a0523be77 100644 --- a/script.coffee +++ b/script.coffee @@ -1222,12 +1222,12 @@ qr = # remove old captchas while (captcha = captchas[0]) and captcha.time < Date.now() captchas.shift() - if captcha = captchas.shift() + if captcha = captchas.shift() challenge = captcha.challenge response = captcha.response else - challenge = qr.captcha.img.alt - if response = qr.captcha.input.value then qr.captcha.reload() + challenge = qr.captcha.img.alt + if response = qr.captcha.input.value then qr.captcha.reload() $.set 'captchas', captchas qr.captcha.count captchas.length unless response @@ -1260,7 +1260,7 @@ qr = upfile: reply.file spoiler: reply.spoiler mode: 'regist' - pwd: if m = d.cookie.match(/4chan_pass=([^;]+)/) then decodeURIComponent m[1] else $('input[name=pwd]').value + pwd: if m = d.cookie.match(/4chan_pass=([^;]+)/) then decodeURIComponent m[1] else $('[name=pwd]').value recaptcha_challenge_field: challenge recaptcha_response_field: response @@ -1292,7 +1292,7 @@ qr = if b.firstChild.tagName # duplicate image link node = b.firstChild node.target = '_blank' - err = b.firstChild.textContent + err = b.firstChild.textContent if err if err is 'You seem to have mistyped the verification.' or err is 'Connection error with sys.4chan.org.' @@ -1307,8 +1307,6 @@ qr = qr.error err, node return - qr.status() - reply = qr.replies[0] persona = $.get 'qr.persona', {} @@ -1333,6 +1331,8 @@ qr = reply.rm() else qr.close() + + qr.status() qr.resetFileInput() message: