Use form.reset().
This commit is contained in:
parent
7a4a238c0c
commit
23edff7283
@ -1348,14 +1348,12 @@
|
||||
return ta.value += text;
|
||||
},
|
||||
refresh: function(dialog) {
|
||||
var f, _ref;
|
||||
$('textarea', dialog).value = '';
|
||||
$('input[name=recaptcha_response_field]', dialog).value = '';
|
||||
if ((_ref = $('input[name=spoiler]', dialog)) != null) {
|
||||
_ref.checked = false;
|
||||
}
|
||||
f = $('input[type=file]', dialog).parentNode;
|
||||
return f.innerHTML = f.innerHTML;
|
||||
var c, m;
|
||||
$('form', dialog).reset();
|
||||
c = d.cookie;
|
||||
$('input[name=name]', dialog).value = (m = c.match(/4chan_name=([^;]+)/)) ? decodeURIComponent(m[1]) : '';
|
||||
$('input[name=email]', dialog).value = (m = c.match(/4chan_email=([^;]+)/)) ? decodeURIComponent(m[1]) : '';
|
||||
return $('input[name=pwd]', dialog).value = (m = c.match(/4chan_pass=([^;]+)/)) ? decodeURIComponent(m[1]) : $('input[name=pwd]').value;
|
||||
},
|
||||
dialog: function(link) {
|
||||
var THREAD_ID, c, challenge, dialog, html, m, mail, name, pass, spoiler, src, submitDisabled, submitValue;
|
||||
|
||||
@ -103,8 +103,7 @@ if not Object.keys
|
||||
|
||||
NAMESPACE = 'AEOS.4chan_x.'
|
||||
d = document
|
||||
g =
|
||||
callbacks: []
|
||||
g = callbacks: []
|
||||
|
||||
ui =
|
||||
dialog: (id, position, html) ->
|
||||
@ -1064,12 +1063,11 @@ qr =
|
||||
ta.value += text
|
||||
|
||||
refresh: (dialog) ->
|
||||
$('textarea', dialog).value = ''
|
||||
$('input[name=recaptcha_response_field]', dialog).value = ''
|
||||
$('input[name=spoiler]', dialog)?.checked = false
|
||||
# XXX file.value = '' doesn't work in opera
|
||||
f = $('input[type=file]', dialog).parentNode
|
||||
f.innerHTML = f.innerHTML
|
||||
$('form', dialog).reset()
|
||||
c = d.cookie
|
||||
$('input[name=name]', dialog).value = if m = c.match(/4chan_name=([^;]+)/) then decodeURIComponent m[1] else ''
|
||||
$('input[name=email]', dialog).value = if m = c.match(/4chan_email=([^;]+)/) then decodeURIComponent m[1] else ''
|
||||
$('input[name=pwd]', dialog).value = if m = c.match(/4chan_pass=([^;]+)/) then decodeURIComponent m[1] else $('input[name=pwd]').value
|
||||
|
||||
dialog: (link) ->
|
||||
submitValue = $('#com_submit').value
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user