When a link to a nostr note is shared, extract noteid or nevent from url, and embed the note
For some reference I know that Primal uses noteId vs what appears to be the more standard nEvent so we would likely need to have at least 2 ways to recognize a nostr note
These two links lead to the same event https://primal.net/e/note1prrgyfue7xxaazapa3lg3p568tpd8883hnunta0ddvmu5ptljyhs2quhg8
https://snort.social/nevent1qqsq335zy7vlrrw73ws7cl5gs6dr4sknnncme7f47hkkkd72q4leztcpr9mhxue69uhhyetvv9ujuumwdae8gtnnda3kjctv9upzqpxfzhdwlm3cx9l6wdzyft8w8y9gy607tqgtyfq7tekaxs7lhmxfqvzqqqqqqyh0nfrc
Do you have any design ideas on how you might want the embed styled?
It doesn't need to be too fancy. So, no no design ideas.
Njump's website widget <script src="https://njump.me/embed/<nip-19-entity>" /> might be handy for this. It creates an embed from any NIP-19 entity.
I'll check it out! I rolled my own from standard nostr-tools functions but I'll see if this is better for us
Still have some stypling to do but WoW!
@sfr0xyz Definitely want to pay you half of this PR, I would have been working on this for ages had I not known about this njump embed!
Looks great!
Thanks a lot! Very glad I could help.