Fetch name, mail and pass in cookies at each qr opening.
This commit is contained in:
parent
0a64ad5ec2
commit
9d91bcf505
@ -1139,14 +1139,14 @@
|
||||
}
|
||||
},
|
||||
dialog: function(link) {
|
||||
var MAX_FILE_SIZE, THREAD_ID, challenge, dialog, html, mail, name, pass, spoiler, src;
|
||||
var MAX_FILE_SIZE, THREAD_ID, challenge, dialog, html, m, mail, name, pass, spoiler, src;
|
||||
MAX_FILE_SIZE = $('input[name="MAX_FILE_SIZE"]').value;
|
||||
THREAD_ID = g.THREAD_ID || $.x('ancestor::div[@class="thread"]/div', link).id;
|
||||
challenge = $('input[name=recaptcha_challenge_field]').value;
|
||||
src = "http://www.google.com/recaptcha/api/image?c=" + challenge;
|
||||
name = $('input[name=name]').value;
|
||||
mail = $('input[name=email]').value;
|
||||
pass = $('input[name=pwd]').value;
|
||||
name = (m = d.cookie.match(/4chan_name=([^;]+)/)) ? unescape(m[1]) : '';
|
||||
mail = (m = d.cookie.match(/4chan_email=([^;]+)/)) ? unescape(m[1]) : '';
|
||||
pass = (m = d.cookie.match(/4chan_pass=([^;]+)/)) ? unescape(m[1]) : $('input[name=pwd]').value;
|
||||
html = " <div class=move> <input class=inputtext type=text name=name placeholder=Name form=qr_form value='" + name + "'> Quick Reply <input type=checkbox id=autohide title=autohide> <a name=close title=close>X</a> </div> <form name=post action=http://sys.4chan.org/" + g.BOARD + "/post method=POST enctype=multipart/form-data target=iframe id=qr_form> <input type=hidden name=MAX_FILE_SIZE value=" + MAX_FILE_SIZE + "> <input type=hidden name=resto value=" + THREAD_ID + "> <input type=hidden name=recaptcha_challenge_field value=" + challenge + "> <div><input class=inputtext type=text name=email placeholder=E-mail value='" + mail + "'></div> <div><input class=inputtext type=text name=sub placeholder=Subject><input type=submit value=Submit id=com_submit></div> <div><textarea class=inputtext name=com placeholder=Comment></textarea></div> <div><img src=" + src + "></div> <div><input class=inputtext type=text name=recaptcha_response_field placeholder=Verification required autocomplete=off></div> <div><input type=file name=upfile></div> <div><input class=inputtext type=password name=pwd maxlength=8 placeholder=Password value='" + pass + "'><input type=hidden name=mode value=regist></div> </form> <div id=error class=error></div> ";
|
||||
dialog = ui.dialog('qr', {
|
||||
top: '0px',
|
||||
|
||||
@ -901,9 +901,9 @@ qr =
|
||||
THREAD_ID = g.THREAD_ID or $.x('ancestor::div[@class="thread"]/div', link).id
|
||||
challenge = $('input[name=recaptcha_challenge_field]').value
|
||||
src = "http://www.google.com/recaptcha/api/image?c=#{challenge}"
|
||||
name = $('input[name=name]').value
|
||||
mail = $('input[name=email]').value
|
||||
pass = $('input[name=pwd]').value
|
||||
name = if m = d.cookie.match(/4chan_name=([^;]+)/) then unescape m[1] else ''
|
||||
mail = if m = d.cookie.match(/4chan_email=([^;]+)/) then unescape m[1] else ''
|
||||
pass = if m = d.cookie.match(/4chan_pass=([^;]+)/) then unescape m[1] else $('input[name=pwd]').value
|
||||
html = "
|
||||
<div class=move>
|
||||
<input class=inputtext type=text name=name placeholder=Name form=qr_form value='#{name}'>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user