diff --git a/4chan_x.user.js b/4chan_x.user.js
index e1680e335..7ec431839 100644
--- a/4chan_x.user.js
+++ b/4chan_x.user.js
@@ -1375,46 +1375,45 @@
if (text == null) {
text = '';
}
+ /*
+ "
+ X
+
Quick Reply
+
+
+
+
+ "
+ #XXX use dom methods to set values instead of injecting raw user input into your html -_-;
+ c = d.cookie
+ $('[name=name]', qr).value = if m = c.match(/4chan_name=([^;]+)/) then decodeURIComponent m[1] else ''
+ $('[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.captchaLength()
+ QR.cooldown() if conf['Cooldown']
+ $.bind $('.close', qr), 'click', QR.close
+ $.bind $('form', qr), 'submit', QR.submit
+ $.bind $('#recaptcha_response_field', qr), 'keydown', QR.keydown
+ $.bind $('#recaptcha_response_field', qr), 'keydown', Recaptcha.listener
+ $.bind $('[type=file]', qr), 'change', QR.change
+ $.bind $('#attach', qr), 'click', QR.attach
+ */
QR.qr = qr = ui.dialog('qr', {
top: '0',
left: '0'
- }, " X Subject Name Email
", {
- /*
- "
- X
- Quick Reply
-
-
-
-
- "
- #XXX use dom methods to set values instead of injecting raw user input into your html -_-;
- c = d.cookie
- $('[name=name]', qr).value = if m = c.match(/4chan_name=([^;]+)/) then decodeURIComponent m[1] else ''
- $('[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.captchaLength()
- QR.cooldown() if conf['Cooldown']
- $.bind $('.close', qr), 'click', QR.close
- $.bind $('form', qr), 'submit', QR.submit
- $.bind $('#recaptcha_response_field', qr), 'keydown', QR.keydown
- $.bind $('#recaptcha_response_field', qr), 'keydown', Recaptcha.listener
- $.bind $('[type=file]', qr), 'change', QR.change
- $.bind $('#attach', qr), 'click', QR.attach
- */
- });
+ }, " X Subject Name Email
");
QR.captchaImg();
$.append(d.body, qr);
ta = $('textarea', qr);
diff --git a/script.coffee b/script.coffee
index 862678e57..7d98c4da8 100644
--- a/script.coffee
+++ b/script.coffee
@@ -1067,45 +1067,6 @@ QR =
disabled: false
QR.submit() if $('#auto', QR.qr).checked
dialog: (text='', tid) ->
- QR.qr = qr = ui.dialog 'qr', top: '0', left: '0', "
- X
-
-
-
- Subject
- Name
- Email
-
-
-
-
-
- 120 Captchas
-
-
-
-
-
- Derp
-
-
- "
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
###
"
X
@@ -1141,6 +1102,29 @@ QR =
$.bind $('[type=file]', qr), 'change', QR.change
$.bind $('#attach', qr), 'click', QR.attach
###
+ QR.qr = qr = ui.dialog 'qr', top: '0', left: '0', "
+ X
+
+
+
+ Subject
+ Name
+ Email
+
+
+
+
+
+ 120 Captchas
+
+
+
+
+
+ Derp
+
+
+ "
QR.captchaImg()
$.append d.body, qr
ta = $ 'textarea', qr