quick-post-controls.js: fix #184

This commit is contained in:
Zankaria 2024-08-28 21:57:03 +02:00
parent 053aacb8bc
commit 333681a95b

View file

@ -15,13 +15,11 @@
$(document).ready(function() {
let open_form = function() {
let thread = $(this).parent().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 + '">' +
@ -69,11 +67,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());
}
post_form.appendTo($(this).parent().parent());
$(window).trigger('quick-post-controls', post_form);
} else {