fsd
This commit is contained in:
parent
4da9604f30
commit
4f5b8eba28
2 changed files with 18 additions and 8 deletions
|
@ -150,8 +150,11 @@ function post_reply(id){
|
|||
form.append('parent_id', id);
|
||||
form.append('body', document.getElementById('reply-form-body-'+id).value);
|
||||
|
||||
for (const e of document.getElementById('file-upload').files)
|
||||
form.append('file', e);
|
||||
try {
|
||||
for (const e of document.getElementById('file-upload').files)
|
||||
form.append('file', e);
|
||||
}
|
||||
catch(e) {}
|
||||
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open("post", "/reply");
|
||||
|
@ -187,8 +190,12 @@ function comment_edit(id){
|
|||
|
||||
form.append('formkey', formkey());
|
||||
form.append('body', document.getElementById('comment-edit-body-'+id).value);
|
||||
for (const e of document.getElementById('file-edit-reply-'+id).files)
|
||||
form.append('file', e);
|
||||
|
||||
try {
|
||||
for (const e of document.getElementById('file-edit-reply-'+id).files)
|
||||
form.append('file', e);
|
||||
}
|
||||
catch(e) {}
|
||||
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open("post", "/edit_comment/"+id);
|
||||
|
@ -228,9 +235,12 @@ function post_comment(fullname){
|
|||
form.append('submission', document.getElementById('reply-form-submission-'+fullname).value);
|
||||
form.append('body', document.getElementById('reply-form-body-'+fullname).value);
|
||||
|
||||
for (const e of document.getElementById('file-upload-reply-'+fullname).files)
|
||||
form.append('file', e);
|
||||
|
||||
try {
|
||||
for (const e of document.getElementById('file-upload-reply-'+fullname).files)
|
||||
form.append('file', e);
|
||||
}
|
||||
catch(e) {}
|
||||
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open("post", "/comment");
|
||||
xhr.setRequestHeader('xhr', 'xhr');
|
||||
|
|
|
@ -850,7 +850,7 @@
|
|||
|
||||
{% if v %}
|
||||
<script src="/assets/js/marked.js?v=250"></script>
|
||||
<script src="/assets/js/comments_v.js?v=264"></script>
|
||||
<script src="/assets/js/comments_v.js?v=265"></script>
|
||||
{% endif %}
|
||||
|
||||
<script src="/assets/js/clipboard.js?v=250"></script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue