From c61d77e1b3f2bbe43a26bbb8fee759485c4824e7 Mon Sep 17 00:00:00 2001 From: kpcto Date: Wed, 26 Aug 2026 22:35:52 +0000 Subject: [PATCH] Remove js/mailto.js --- js/mailto.js | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 js/mailto.js diff --git a/js/mailto.js b/js/mailto.js deleted file mode 100644 index d353119..0000000 --- a/js/mailto.js +++ /dev/null @@ -1,15 +0,0 @@ -/** - * Build a `mailto:` URL from an address, subject, and body. - * Subject and body are URL-encoded so the visitor's mail client - * opens pre-filled with the submitted values. - * - * @param {{to?: string, subject?: string, body?: string}} options - * @returns {string} - */ -export function buildMailtoUrl({ to = "", subject = "", body = "" } = {}) { - const params = new URLSearchParams(); - if (subject) params.set("subject", subject); - if (body) params.set("body", body); - const query = params.toString(); - return query ? `mailto:${to}?${query}` : `mailto:${to}`; -}