From 3f976d0cf495cd4b66e4b9c1fe8b48fb8e80b28d Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Wed, 10 Jun 2026 18:56:40 -0400 Subject: [PATCH] Add Copy JSON, rich media rendering, default relays, and broad event support - Default relays (editable, persisted to localStorage); relay no longer required - Copy JSON button on the result - Kind-aware previews: profile, notes, reactions, reposts, pictures, video, file metadata, zaps, and long-form (sanitized Markdown) - Inline media (image/video/audio) from imeta, url tags, and content URLs - Platform detection + view links for bitvid, VoxVera, and Artstr Studio - Universal njump link, signature-validity badge, large-event truncation - Bump nostr-tools 1.7.5 -> 2.10.4 (promise-based pool.get), fixes EOSE race - Render via textContent/DOMPurify to avoid XSS from untrusted event content Co-Authored-By: Claude Opus 4.8 --- src/index.html | 1133 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 1022 insertions(+), 111 deletions(-) diff --git a/src/index.html b/src/index.html index 2656e99..d9f7482 100644 --- a/src/index.html +++ b/src/index.html @@ -17,7 +17,6 @@ display: flex; flex-direction: column; align-items: center; - justify-content: center; min-height: 100vh; margin: 0; } @@ -26,26 +25,136 @@ -webkit-background-clip: text; -webkit-text-fill-color: transparent; } + .spin { + animation: spin 0.8s linear infinite; + } + @keyframes spin { + to { + transform: rotate(360deg); + } + } + pre { + scrollbar-width: thin; + } + /* Rendered Markdown (long-form / NIP-23) */ + .md { + line-height: 1.6; + } + .md h1, + .md h2, + .md h3, + .md h4 { + font-weight: 700; + margin: 0.9em 0 0.4em; + line-height: 1.25; + } + .md h1 { + font-size: 1.5rem; + } + .md h2 { + font-size: 1.3rem; + } + .md h3 { + font-size: 1.1rem; + } + .md p { + margin: 0.6em 0; + } + .md a { + color: #c084fc; + text-decoration: underline; + word-break: break-word; + } + .md ul, + .md ol { + margin: 0.6em 0; + padding-left: 1.4em; + } + .md ul { + list-style: disc; + } + .md ol { + list-style: decimal; + } + .md blockquote { + border-left: 3px solid #7c3aed; + padding-left: 0.8em; + color: #9ca3af; + margin: 0.6em 0; + } + .md code { + background: #111827; + padding: 0.1em 0.3em; + border-radius: 4px; + font-size: 0.9em; + } + .md pre { + background: #111827; + padding: 0.8em; + border-radius: 8px; + overflow: auto; + } + .md pre code { + background: none; + padding: 0; + } + .md img { + max-width: 100%; + height: auto; + border-radius: 8px; + margin: 0.6em 0; + } + .md hr { + border-color: #374151; + margin: 1em 0; + } -
-

Nostr Event Explorer

-

Enter a relay URL (optional if using nevent with relays) and an event ID (hex, note1..., or nevent1...).

+
+
+

Nostr Event Explorer

+

+ Paste an event ID (hex, note1, nevent1), + an addressable coordinate (naddr1), or a profile + (npub1, nprofile1). Relays are optional — + sensible defaults are used. +

+
+
- + +
+ + Relays + edit + +
+ +
+ One relay per line (wss:// or ws://). Saved in your browser. + +
+
+
+
+ + - \ No newline at end of file +