Skip to content

feat(dev): Clipboard Inspector tool - #176

Merged
slaveofcode merged 1 commit into
developfrom
feat/clipboard-inspector
Aug 8, 2026
Merged

feat(dev): Clipboard Inspector tool#176
slaveofcode merged 1 commit into
developfrom
feat/clipboard-inspector

Conversation

@slaveofcode

Copy link
Copy Markdown
Owner

Clipboard Inspector

Inspect and save clipboard contents of any type — text, HTML, images, video, audio, and files.

Two capture modes

  • Read Clipboard buttonnavigator.clipboard.read() for text, HTML, and images; browser prompts for clipboard-read permission on first use
  • Paste zone (⌘V / Ctrl+V anywhere on page) — captures via paste event including video/audio/binary files copied from Finder or File Explorer

Features

  • Session history of every read/paste as timestamped snapshots
  • Per-item type badge + preview (text, rendered HTML, image, video player, audio player, binary info)
  • HTML: toggle between rendered iframe (sandboxed) and raw source
  • Save to disk button on every item
  • Blob URL cleanup on removal / unmount

Files

  • src/tools/dev/clipboard.lib.ts — pure lib (parseDataTransfer, readClipboard, previewKindOf, formatSize, mimeToExtension)
  • src/tools/dev/clipboard.lib.test.ts — 35 tests, all pass
  • src/islands/dev/ClipboardInspector.tsx — React island
  • src/registry/tools.ts — registered as clipboard-inspector in Dev category

🤖 Generated with Claude Code

Inspect and save whatever is on the clipboard — text, HTML, images,
video, audio, and any file type:

- Read Clipboard button: uses navigator.clipboard.read() for text,
  HTML, and images (browser may prompt for clipboard-read permission)
- Paste zone (Cmd/Ctrl+V): captures any content via the paste event,
  including video and audio files copied from the file manager
- Session history: every read/paste is kept as a snapshot with a
  source badge, timestamp, and per-item preview + Save button
- Previews: <pre> for text, sandboxed <iframe> + source toggle for HTML,
  <img> for images, <video controls> for video, <audio controls> for
  audio, file info + download for binary/PDF
- Save to disk: per-item download via downloadService
- Memory-safe: blob URLs are revoked on entry removal and on unmount

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
goodwebtools dd0377d Aug 08 2026, 07:46 AM

@slaveofcode
slaveofcode merged commit c4cfe34 into develop Aug 8, 2026
2 checks passed
@slaveofcode
slaveofcode deleted the feat/clipboard-inspector branch August 8, 2026 07:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant