From 886bfdc52aaa7f4c5dbb9f606cdb66391a803820 Mon Sep 17 00:00:00 2001 From: Zankaria Date: Thu, 13 Feb 2025 23:12:21 +0100 Subject: [PATCH 1/2] ajax.js: trim --- js/ajax.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/js/ajax.js b/js/ajax.js index 56f0df5c..ca9e74e2 100644 --- a/js/ajax.js +++ b/js/ajax.js @@ -18,7 +18,7 @@ $(window).ready(function() { // Enable submit button if disabled (cache problem) $('input[type="submit"]').removeAttr('disabled'); - + var setup_form = function($form) { $form.submit(function() { if (do_not_ajax) @@ -27,7 +27,7 @@ $(window).ready(function() { var submit_txt = $(this).find('input[type="submit"]').val(); if (window.FormData === undefined) return true; - + var formData = new FormData(this); formData.append('json_response', '1'); formData.append('post', submit_txt); @@ -91,11 +91,11 @@ $(window).ready(function() { setTimeout(function() { $(window).trigger("scroll"); }, 100); } }); - + highlightReply(post_response.id); window.location.hash = post_response.id; $(window).scrollTop($('div.post#reply_' + post_response.id).offset().top); - + $(form).find('input[type="submit"]').val(submit_txt); $(form).find('input[type="submit"]').removeAttr('disabled'); $(form).find('input[name="subject"],input[name="file_url"],\ @@ -125,10 +125,10 @@ $(window).ready(function() { contentType: false, processData: false }, 'json'); - + $(form).find('input[type="submit"]').val(_('Posting...')); $(form).find('input[type="submit"]').attr('disabled', true); - + return false; }); }; From e978bfd69739824ee81d9bc02cdfbac319b97981 Mon Sep 17 00:00:00 2001 From: Zankaria Date: Thu, 13 Feb 2025 00:00:20 +0100 Subject: [PATCH 2/2] ajax.js: clear embed --- js/ajax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/ajax.js b/js/ajax.js index ca9e74e2..05bf0ed3 100644 --- a/js/ajax.js +++ b/js/ajax.js @@ -99,7 +99,7 @@ $(window).ready(function() { $(form).find('input[type="submit"]').val(submit_txt); $(form).find('input[type="submit"]').removeAttr('disabled'); $(form).find('input[name="subject"],input[name="file_url"],\ - textarea[name="body"],input[type="file"]').val('').change(); + textarea[name="body"],input[type="file"],input[name="embed"]').val('').change(); }, cache: false, contentType: false,