Conversation
|
@fiatjaf I probably should explain why exactly I think this is needed: The only way an extension can directly check if an extension is installed is by using the overly-permissive Right now the only way (that I can think of) to indirectly detect the presence of this extension, is to abuse the This is very hacky and may break if |
|
What about checking if |
|
I think we can merge this, but if this is the way it should be added to NIP-07 first so other extensions can implement it. |
This wouldn't work for background scripts unless they create a content script on a non-extension page first to check for it. An extension I'm working on does this because the websocket connections live in the background script.
Given that this is the ideal way, are you saying that I actually should make a PR for nostr-protocol/nips#1370? One thing to note (I mentioned this in the linked issue): if a background script wants to utilize another extension for NIP-07 functionality using the Messaging API, they will need to have their own hardcoded list of extension IDs to do |
Adds a noop
pingcommand that an external extension could call to detect if nos2x is installed.