Skip to content

Conversation

@brainkim
Copy link
Member

Implement shareable links for playground code using LZ-String compression. Users can now share their code snippets via URL and load code from shared links.

Features:

  • Load code from URL hash on page load
  • Auto-update URL hash as code changes (debounced)
  • Copy Link button with visual feedback
  • Support for browser back/forward navigation
  • Maintains localStorage backup for unsaved work

The URL hash is updated 1 second after the user stops typing to avoid excessive history pollution. The compressed URLs are significantly shorter than base64-encoded alternatives.

Implement shareable links for playground code using LZ-String compression.
Users can now share their code snippets via URL and load code from shared links.

Features:
- Load code from URL hash on page load
- Auto-update URL hash as code changes (debounced)
- Copy Link button with visual feedback
- Support for browser back/forward navigation
- Maintains localStorage backup for unsaved work

The URL hash is updated 1 second after the user stops typing to avoid
excessive history pollution. The compressed URLs are significantly shorter
than base64-encoded alternatives.
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.

3 participants