fiatjaf / nos2x

nostr signer extension
278 stars 55 forks source link

Allow accessing window.nostr in frames #41

Closed enjikaka closed 1 year ago

enjikaka commented 1 year ago

Currently if you have code in for example an iframe that tries to use NIP-07 it fails since window.nostr is not available even though the extension is installed. This is because of all_frames: true is missing in the manifest for the content script. I need this for a project I work on, so would be nice to get in. :)

https://developer.chrome.com/docs/extensions/mv3/content_scripts/#frames

An other NIP-07 ext, Alby, already has this: https://github.com/getAlby/lightning-browser-extension/blob/a14c56ac317764af4203cb1b3e2afece0d77d3e8/src/manifest.json#L152