Skip to content

Add Share-as-URL: encode inspection results into a static link#18

Open
DmitriyAlergant wants to merge 2 commits into
Evercoder:mainfrom
DmitriyAlergant:feature/share-as-url
Open

Add Share-as-URL: encode inspection results into a static link#18
DmitriyAlergant wants to merge 2 commits into
Evercoder:mainfrom
DmitriyAlergant:feature/share-as-url

Conversation

@DmitriyAlergant

@DmitriyAlergant DmitriyAlergant commented May 22, 2026

Copy link
Copy Markdown

Adds a "Share as URL" button that encodes the current inspection into a gzipped base64url payload stored in location.hash. Opening that URL re-renders the same inspection. No backend.

Also allows recepients to copy the shared contents back into their clipboard.

Why: for users that need to share raw clipboard contents when reporting clipboard-related issues to maintainers of software they use.

Notes

  • Uses CompressionStream('gzip') / DecompressionStream (modern browsers).
  • index.js was intentionally left out of this PR to keep the diff readable; please npm run build before deploying.

DmitriyAlergant and others added 2 commits May 22, 2026 13:13
Encodes the extracted clipboard data (with file blobs inlined as data URLs)
into a gzipped base64url payload stored in location.hash. On page load, if
the hash is present, the saved inspection is rendered directly. No backend.

Motivation: users want to share raw clipboard contents when reporting
pasting-related issues to maintainers of software they use.
The recipient of a Share-as-URL link can now write the inspected payload
back into their own clipboard. Reconstructs a multi-type ClipboardItem
from .types / .items / .files (including data:-URL blobs from inlined
files) and writes via navigator.clipboard.write. Falls back to a reduced
set (text/plain, text/html, image/png) if the browser rejects custom
MIME types, and to writeText() as a last resort.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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