#243 fix attempt 2: capitalize action buttons; link button keeps its label after copy feedback
CI / test (pull_request) Successful in 20s
CI / docker (pull_request) Skipped

This commit is contained in:
fen
2026-09-16 15:56:15 -05:00
parent 3c5ccfb787
commit e7ecb9789b
3 changed files with 8 additions and 7 deletions
+2 -1
View File
@@ -18,10 +18,11 @@ function toggleStats() {
}
function copyFeedback(btn) {
if (!btn) return;
if (!btn.dataset.label) btn.dataset.label = btn.textContent; // remember the original label (Copy/Link)
btn.classList.add('ok');
btn.textContent = 'Success!';
clearTimeout(btn._okh);
btn._okh = setTimeout(() => { btn.classList.remove('ok'); btn.textContent = 'copy'; }, 2000);
btn._okh = setTimeout(() => { btn.classList.remove('ok'); btn.textContent = btn.dataset.label; }, 2000);
}
function copyContent(btn) {
navigator.clipboard.writeText(document.getElementById('raw-content').value)