diff --git a/root/details/index.html b/root/details/index.html index 24e8b02..7a3aa87 100644 --- a/root/details/index.html +++ b/root/details/index.html @@ -111,7 +111,7 @@ .share_button { position: relative; - margin-top: 5px; + margin: 5px; float: right; text-decoration: none; } @@ -173,6 +173,9 @@

Common RyotaK Scoring System Calculator

+ + +
@@ -283,6 +286,7 @@

OWSC

} document.getElementById('cre_id').textContent = id; document.getElementById('cre_id').appendChild(document.getElementById('share_twitter')); + document.getElementById('cre_id').appendChild(document.getElementById('share_clipboard')); document.title = `CRSS Calculator - ${id}`; const resp = await fetch(`https://raw.githubusercontent.com/gnknzm/crss.gnknzm.net/database/${encodeURIComponent(id)}.json?${Math.random()}`); if (resp.status !== 200) { @@ -315,6 +319,9 @@

OWSC

severityElement.textContent = format(overall_score) + ' ' + severity.label; severityElement.className = severity.class; + document.getElementById('share_clipboard').addEventListener('click', () => { + navigator.clipboard.writeText(`${data.author}「${data.text}」${format(overall_score) + ' ' + severity.label} \nhttps://crss.gnknzm.net/details/?id=${id}`); + }); document.getElementById('share_twitter').href = `https://x.com/intent/tweet?text=${encodeURIComponent(`${data.author}「${data.text}」${format(overall_score) + ' ' + severity.label} \n#CRSS\nhttps://crss.gnknzm.net/details/?id=${id}`)}`; })();