Added nostr.enable() function to page injection. This is for Alby compatibility, and let's it work with nostr.band.
This commit is contained in:
@@ -13,6 +13,12 @@ window.nostr = {
|
||||
return await this.broadcast('getRelays');
|
||||
},
|
||||
|
||||
// This is here for Alby comatibility. This is not part of the NIP-07 standard.
|
||||
// I have found at least one site, nostr.band, which expects it to be present.
|
||||
async enable() {
|
||||
return {enabled: true}
|
||||
},
|
||||
|
||||
broadcast(kind, payload) {
|
||||
let reqId = Math.random().toString();
|
||||
return new Promise((resolve, _reject) => {
|
||||
|
||||
Reference in New Issue
Block a user