");
c = d.cookie;
$('[name=name]', qr).value = (m = c.match(/4chan_name=([^;]+)/)) ? decodeURIComponent(m[1]) : '';
$('[name=email]', qr).value = (m = c.match(/4chan_email=([^;]+)/)) ? decodeURIComponent(m[1]) : '';
$('[name=pwd]', qr).value = (m = c.match(/4chan_pass=([^;]+)/)) ? decodeURIComponent(m[1]) : $('input[name=pwd]').value;
$('textarea', qr).value = text;
+ QR.captchaImg();
QR.captchaLength();
if (conf['Cooldown']) {
QR.cooldown();
diff --git a/script.coffee b/script.coffee
index c2d3fd591..040b91457 100644
--- a/script.coffee
+++ b/script.coffee
@@ -1013,11 +1013,15 @@ QR =
else
QR.resetFile old
captchaNode: (e) ->
- c = e.target.value
- $('img', QR.qr).src = "http://www.google.com/recaptcha/api/image?c=#{c}" if QR.qr
QR.captcha =
- challenge: c
+ challenge: e.target.value
time: Date.now()
+ QR.captchaImg()
+ captchaImg: ->
+ {qr} = QR
+ return unless qr
+ c = QR.captcha.challenge
+ $('img', qr).src = "http://www.google.com/recaptcha/api/image?c=#{c}"
captchaPush: (el) ->
{captcha} = QR
captcha.response = el.value
@@ -1078,7 +1082,7 @@ QR =
#{QR.spoiler}
-
+
#{QR.file}
@@ -1092,6 +1096,7 @@ QR =
$('[name=email]', qr).value = if m = c.match(/4chan_email=([^;]+)/) then decodeURIComponent m[1] else ''
$('[name=pwd]', qr).value = if m = c.match(/4chan_pass=([^;]+)/) then decodeURIComponent m[1] else $('input[name=pwd]').value
$('textarea', qr).value = text
+ QR.captchaImg()
QR.captchaLength()
QR.cooldown() if conf['Cooldown']
$.bind $('.close', qr), 'click', QR.close