mirror of
https://github.com/aljazceru/nostr-profile-manager.git
synced 2025-12-17 13:44:20 +01:00
preventDefault() on an onclick handler.
This commit is contained in:
@@ -67,7 +67,8 @@ const LoadLandingPage = () => {
|
|||||||
o.innerHTML = aboutcontent;
|
o.innerHTML = aboutcontent;
|
||||||
const a = document.getElementById('loadextension');
|
const a = document.getElementById('loadextension');
|
||||||
if (a) {
|
if (a) {
|
||||||
a.onclick = async () => {
|
a.onclick = async (ev) => {
|
||||||
|
ev.preventDefault()
|
||||||
if (window.nostr) {
|
if (window.nostr) {
|
||||||
const pubkey = await window.nostr.getPublicKey();
|
const pubkey = await window.nostr.getPublicKey();
|
||||||
localStorageSetItem('pubkey', pubkey);
|
localStorageSetItem('pubkey', pubkey);
|
||||||
|
|||||||
Reference in New Issue
Block a user