From eeef347471f49463307c1464dde7f2fda504a3ab Mon Sep 17 00:00:00 2001 From: James Campos Date: Mon, 5 Sep 2011 11:58:18 -0700 Subject: [PATCH] pass, delete old qr html --- 4chan_x.user.js | 27 ++------------------------- script.coffee | 34 +++++++--------------------------- 2 files changed, 9 insertions(+), 52 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 9ef8bc759..1161e910d 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -1387,37 +1387,14 @@ if (tid == null) { tid = g.THREAD_ID; } - /* - " - X -
Quick Reply
-
- - - - -
#{QR.spoiler}
-
-
-
-
-
#{QR.file}
-
-
-
attach another file
- - " - #XXX use dom methods to set values instead of injecting raw user input into your html -_-; - $('[name=pwd]', qr).value = if m = c.match(/4chan_pass=([^;]+)/) then decodeURIComponent m[1] else $('input[name=pwd]').value - $.bind $('#attach', qr), 'click', QR.attach - */ QR.qr = qr = ui.dialog('qr', { top: '0', left: '0' - }, " X
Subject Name Email
120 Captchas
" + QR.spoiler + "
Derp "); + }, "
X
Subject Name Email Password
120 Captchas
" + QR.spoiler + "
Derp "); 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; if (conf['Cooldown']) { QR.cooldown(); diff --git a/script.coffee b/script.coffee index 298f8dccc..fc0dbd5f5 100644 --- a/script.coffee +++ b/script.coffee @@ -1071,39 +1071,16 @@ QR = disabled: false QR.submit() if $('#autopost', QR.qr).checked dialog: (text='', tid=g.THREAD_ID) -> - ### - " -
X -
Quick Reply
-
- - - - -
#{QR.spoiler}
-
-
-
-
-
#{QR.file}
-
-
-
attach another file
- - " - #XXX use dom methods to set values instead of injecting raw user input into your html -_-; - $('[name=pwd]', qr).value = if m = c.match(/4chan_pass=([^;]+)/) then decodeURIComponent m[1] else $('input[name=pwd]').value - $.bind $('#attach', qr), 'click', QR.attach - ### QR.qr = qr = ui.dialog 'qr', top: '0', left: '0', " X
- Subject - Name - Email + Subject + Name + Email + Password
@@ -1129,9 +1106,12 @@ QR = Derp " + #$.bind $('#attach', qr), 'click', QR.attach + #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.cooldown() if conf['Cooldown'] $.bind $('button', qr), 'click', -> $('[type=file]', qr).click()