preventDefault() on an onclick handler.

This commit is contained in:
fiatjaf
2024-02-19 14:22:02 -03:00
parent fc9b576e81
commit aed1b14492

View File

@@ -67,7 +67,8 @@ const LoadLandingPage = () => {
o.innerHTML = aboutcontent;
const a = document.getElementById('loadextension');
if (a) {
a.onclick = async () => {
a.onclick = async (ev) => {
ev.preventDefault()
if (window.nostr) {
const pubkey = await window.nostr.getPublicKey();
localStorageSetItem('pubkey', pubkey);