pass, delete old qr html
This commit is contained in:
parent
10c1575c88
commit
eeef347471
@ -1387,37 +1387,14 @@
|
||||
if (tid == null) {
|
||||
tid = g.THREAD_ID;
|
||||
}
|
||||
/*
|
||||
"
|
||||
<a class=close title=close>X</a><input type=checkbox id=autohide title=autohide>
|
||||
<div class=move><input placeholder=Name name=name form=qr_form class=inputtext>Quick Reply</div>
|
||||
<form enctype=multipart/form-data method=post action=http://sys.4chan.org/#{g.BOARD}/post target=iframe id=qr_form>
|
||||
<input type=hidden name=resto value=#{tid}>
|
||||
<input type=hidden name=mode value=regist>
|
||||
<input type=hidden name=recaptcha_challenge_field id=challenge>
|
||||
<input type=hidden name=recaptcha_response_field id=response>
|
||||
<div><input placeholder=Email name=email class=inputtext>#{QR.spoiler}</div>
|
||||
<div><input placeholder=Subject name=sub class=inputtext><button>Submit</button><label>auto<input id=auto type=checkbox></label></div>
|
||||
<div><textarea placeholder=Comment name=com class=inputtext></textarea></div>
|
||||
<div><img></div>
|
||||
<div><input placeholder=Verification autocomplete=off id=recaptcha_response_field class=inputtext><span id=cl></span></div>
|
||||
<div>#{QR.file}</div>
|
||||
</form>
|
||||
<div id=files></div>
|
||||
<div><input placeholder=Password name=pwd type=password class=inputtext><a id=attach>attach another file</a></div>
|
||||
<a class=error></a>
|
||||
"
|
||||
#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'
|
||||
}, " <a class=close>X</a> <input type=checkbox id=autohide title=autohide> <div class=move> <span class=click> <button>File</button> <span><input form=qr_form name=sub placeholder=Subject><span>Subject</span></span> <span><input form=qr_form name=name placeholder=Name><span>Name</span></span> <span><input form=qr_form name=email placeholder=Email><span>Email</span></span> </span> </div> <form enctype=multipart/form-data method=post action=http://sys.4chan.org/" + g.BOARD + "/post target=iframe id=qr_form> <div hidden> <input name=resto value=" + tid + "> <input name=mode value=regist> <input name=recaptcha_challenge_field id=challenge> <input name=recaptcha_response_field id=response> <input type=file name=upfile> </div> <textarea placeholder=Comment name=com></textarea> <div id=thumbs></div> <div id=captcha> <div><img></div> <span id=cl>120 Captchas</span> <input id=recaptcha_response_field> </div> <div> <button>Submit</button> <label>[<input type=checkbox id=autopost title=autopost> Autopost]</label> " + QR.spoiler + " </div> <a class=error>Derp</span> </form> ");
|
||||
}, " <a class=close>X</a> <input type=checkbox id=autohide title=autohide> <div class=move> <span class=click> <button>File</button> <span><input form=qr_form placeholder=Subject name=sub><span>Subject</span></span> <span><input form=qr_form placeholder=Name name=name><span>Name</span></span> <span><input form=qr_form placeholder=Email name=email><span>Email</span></span> <span><input form=qr_form placeholder=Password name=pwd type=password><span>Password</span></span> </span> </div> <form enctype=multipart/form-data method=post action=http://sys.4chan.org/" + g.BOARD + "/post target=iframe id=qr_form> <div hidden> <input name=resto value=" + tid + "> <input name=mode value=regist> <input name=recaptcha_challenge_field id=challenge> <input name=recaptcha_response_field id=response> <input type=file name=upfile> </div> <textarea placeholder=Comment name=com></textarea> <div id=thumbs></div> <div id=captcha> <div><img></div> <span id=cl>120 Captchas</span> <input id=recaptcha_response_field> </div> <div> <button>Submit</button> <label>[<input type=checkbox id=autopost title=autopost> Autopost]</label> " + QR.spoiler + " </div> <a class=error>Derp</span> </form> ");
|
||||
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();
|
||||
|
||||
@ -1071,39 +1071,16 @@ QR =
|
||||
disabled: false
|
||||
QR.submit() if $('#autopost', QR.qr).checked
|
||||
dialog: (text='', tid=g.THREAD_ID) ->
|
||||
###
|
||||
"
|
||||
<a class=close title=close>X</a><input type=checkbox id=autohide title=autohide>
|
||||
<div class=move><input placeholder=Name name=name form=qr_form class=inputtext>Quick Reply</div>
|
||||
<form enctype=multipart/form-data method=post action=http://sys.4chan.org/#{g.BOARD}/post target=iframe id=qr_form>
|
||||
<input type=hidden name=resto value=#{tid}>
|
||||
<input type=hidden name=mode value=regist>
|
||||
<input type=hidden name=recaptcha_challenge_field id=challenge>
|
||||
<input type=hidden name=recaptcha_response_field id=response>
|
||||
<div><input placeholder=Email name=email class=inputtext>#{QR.spoiler}</div>
|
||||
<div><input placeholder=Subject name=sub class=inputtext><button>Submit</button><label>auto<input id=auto type=checkbox></label></div>
|
||||
<div><textarea placeholder=Comment name=com class=inputtext></textarea></div>
|
||||
<div><img></div>
|
||||
<div><input placeholder=Verification autocomplete=off id=recaptcha_response_field class=inputtext><span id=cl></span></div>
|
||||
<div>#{QR.file}</div>
|
||||
</form>
|
||||
<div id=files></div>
|
||||
<div><input placeholder=Password name=pwd type=password class=inputtext><a id=attach>attach another file</a></div>
|
||||
<a class=error></a>
|
||||
"
|
||||
#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', "
|
||||
<a class=close>X</a>
|
||||
<input type=checkbox id=autohide title=autohide>
|
||||
<div class=move>
|
||||
<span class=click>
|
||||
<button>File</button>
|
||||
<span><input form=qr_form name=sub placeholder=Subject><span>Subject</span></span>
|
||||
<span><input form=qr_form name=name placeholder=Name><span>Name</span></span>
|
||||
<span><input form=qr_form name=email placeholder=Email><span>Email</span></span>
|
||||
<span><input form=qr_form placeholder=Subject name=sub><span>Subject</span></span>
|
||||
<span><input form=qr_form placeholder=Name name=name><span>Name</span></span>
|
||||
<span><input form=qr_form placeholder=Email name=email><span>Email</span></span>
|
||||
<span><input form=qr_form placeholder=Password name=pwd type=password><span>Password</span></span>
|
||||
</span>
|
||||
</div>
|
||||
<form enctype=multipart/form-data method=post action=http://sys.4chan.org/#{g.BOARD}/post target=iframe id=qr_form>
|
||||
@ -1129,9 +1106,12 @@ QR =
|
||||
<a class=error>Derp</span>
|
||||
</form>
|
||||
"
|
||||
#$.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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user