Skip to main content

max / makenotwork

Fold the last hand-rolled copy revert onto core/clipboard.ts onCopyItemId set the label, then set a timer to put it back, which is what copyWithFeedback's resetMs already does for every other copy button. It now calls the helper through the legacy bridge. 1500 is carried across unchanged: the number stays what it was, only its owner moves. The task's other two claims were already settled by 4c2fd4e2 on 2026-08-18, which folded six sites and extracted autoDismiss out of htmx-glue. The four remaining `debounce` names are setTimeout handles in four separate classic scripts, not four definitions of a helper, so there is nothing there to collapse to an import. GoingsOn mnw-server b9320108.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-08-23 20:26 UTC
Signed with PGP, not checked
Commit: 0dca20c6bcc9d9604708a77159c868cec71531e9
Parent: d1fec7b
1 file changed, +4 insertions, -2 deletions
@@ -10,9 +10,11 @@
10 10 setTimeout(function(){ window.location.reload(); }, 500);
11 11 };
12 12
13 - // Copy the item id to the clipboard and flash feedback on the button.
13 + // Copy the item id to the clipboard and flash feedback on the button. The
14 + // revert is core/clipboard.ts's, through the legacy bridge; 1500 is the
15 + // duration this button already used.
14 16 window.onCopyItemId = function (id) {
15 - navigator.clipboard.writeText(id); this.textContent='Copied!'; setTimeout(()=>this.textContent='Copy Item ID', 1500);
17 + window.copyWithFeedback(this, id, 'Copied!', 1500);
16 18 };
17 19
18 20 // Custom page reset form: confirm before submitting. data-submit auto-prevents