Image from clipboard also in replies

This commit is contained in:
2026-06-29 00:16:58 +02:00
parent aa0def2949
commit e4389de288
4 changed files with 40 additions and 27 deletions
+5 -1
View File
@@ -3,7 +3,10 @@
// pid aus dem Pfad /e/<pid>.
const pid = location.pathname.split("/")[2] || "";
document.getElementById("reply-form").addEventListener("submit", async (e) => {
const replyForm = document.getElementById("reply-form");
setupClipboardPaste(replyForm, document.getElementById("reply-paste-msg"));
replyForm.addEventListener("submit", async (e) => {
e.preventDefault();
const fd = new FormData(e.target);
fd.append("reply_to", pid);
@@ -11,6 +14,7 @@ document.getElementById("reply-form").addEventListener("submit", async (e) => {
if (res.ok) {
e.target.reset();
document.getElementById("reply-msg").textContent = "";
document.getElementById("reply-paste-msg").textContent = "";
load();
} else {
document.getElementById("reply-msg").textContent =