tell user if can't sign up because no extension
This commit is contained in:
parent
3327b6a1ee
commit
805ad5fad9
2 changed files with 33 additions and 2 deletions
|
|
@ -1,6 +1,15 @@
|
|||
window.onload = function () {
|
||||
if (!window.nostr) {
|
||||
console.log("Nostr extension not present");
|
||||
document.querySelector('#nostr-signup').disabled = true;
|
||||
document.querySelector('#no-extension-nudges').style.display = 'block';
|
||||
} else {
|
||||
console.log("Nostr extension present");
|
||||
}
|
||||
}
|
||||
|
||||
async function acceptInvite() {
|
||||
|
||||
// check if there is nostr extension
|
||||
if (!window.nostr) {
|
||||
console.log("No Nostr extension found.");
|
||||
return { success: false, error: "No Nostr extension detected." };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue