forked from GithubBackups/vichan
quick-post-controls.js: port to new html structure
This commit is contained in:
parent
e4a8757a3d
commit
210423ec0a
@ -14,13 +14,11 @@
|
||||
|
||||
$(document).ready(function() {
|
||||
let open_form = function() {
|
||||
let thread = $(this).parent().parent().hasClass('op');
|
||||
let id = $(this).attr('name').match(/^delete_(\d+)$/)[1];
|
||||
|
||||
if (this.checked) {
|
||||
let post_form = $('<form class="post-actions" method="post" style="margin:10px 0 0 0">' +
|
||||
'<div style="text-align:right">' +
|
||||
(!thread ? '<hr>' : '') +
|
||||
'<div style="text-align:right"><hr>' +
|
||||
|
||||
'<input type="hidden" name="delete_' + id + '">' +
|
||||
|
||||
@ -57,11 +55,7 @@ $(document).ready(function() {
|
||||
|
||||
post_form.find('input[type="password"]').val(localStorage.password);
|
||||
|
||||
if (thread) {
|
||||
post_form.prependTo($(this).parent().parent().find('div.body'));
|
||||
} else {
|
||||
post_form.appendTo($(this).parent().parent());
|
||||
}
|
||||
|
||||
$(window).trigger('quick-post-controls', post_form);
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user