Email: copy the address instead of a bare mailto link; drop the checksum how-to from the site

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
vrubelroman 2026-10-19 17:34:38 +03:00
parent e50c117f56
commit c66117e387
13 changed files with 89 additions and 36 deletions

View file

@ -164,7 +164,6 @@ p { margin: 0 0 12px; }
details { margin-top: 10px; }
summary { cursor: pointer; color: var(--accent-text); }
.verify { margin-top: 24px; color: var(--text-2); font-size: 15px; }
.verify-how { font-size: 15px; }
/* Engine, open source, support */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@ -179,6 +178,12 @@ summary { cursor: pointer; color: var(--accent-text); }
.card svg { width: 24px; height: 24px; fill: none; stroke: var(--accent-text); stroke-width: 1.5; stroke-linejoin: round; flex: none; }
.card span { display: flex; flex-direction: column; font-size: 16px; overflow-wrap: anywhere; }
.card b { font-size: 13px; font-weight: 600; color: var(--text-2); }
.card-mail:hover { border-color: var(--border); }
.card-mail .addr { user-select: all; }
.card-mail .mail-actions { display: flex; flex-flow: row wrap; align-items: baseline; gap: 4px 16px; margin-top: 6px; font-size: 14px; }
.mail-copy { margin: 0; padding: 0; text-align: left; border: 0; background: none; color: var(--accent-text); font: inherit; cursor: pointer; }
.mail-copy:hover { text-decoration: underline; }
.mail-copy.done { color: var(--text-2); }
/* Footer */
.foot { margin-top: 96px; border-top: 1px solid var(--border); padding: 32px 0 48px; font-size: 14px; color: var(--text-2); }

View file

@ -166,6 +166,19 @@
});
});
// --- Email: copy the address (works without a mail app) -------------------------
var mailCopy = document.querySelector(".mail-copy");
if (mailCopy && navigator.clipboard) {
mailCopy.hidden = false;
mailCopy.addEventListener("click", function () {
var addr = document.querySelector(".card-mail .addr").textContent;
navigator.clipboard.writeText(addr).then(function () {
mailCopy.textContent = t("mail_copied"); mailCopy.classList.add("done");
setTimeout(function () { mailCopy.textContent = t("mail_copy"); mailCopy.classList.remove("done"); }, 2000);
});
});
}
// --- Download tabs ---------------------------------------------------------------
var tabs = Array.prototype.slice.call(document.querySelectorAll('.tabs [role="tab"]'));
function select(tab, focus) {