debug alby again... sigh

This commit is contained in:
William Casarin 2022-11-18 07:39:16 -08:00
parent bb27b1c339
commit c783b430bf
3 changed files with 3 additions and 2 deletions

View file

@ -9,7 +9,7 @@ emojiregex: fake
@curl -sL 'https://raw.githubusercontent.com/mathiasbynens/emoji-test-regex-pattern/main/dist/latest/javascript.txt'
dist:
rsync -avzP ./ charon:/www/damus.io/web/
rsync -avzP --delete ./ charon:/www/damus.io/web/
dist-staging:
rsync -avzP ./ charon:/www/damus.io/web-staging/

View file

@ -16,9 +16,9 @@
</head>
<body>
<script>
const relay = 0; // relay is declared for backwards compatibibility.
// This is our main entry.
// https://developer.mozilla.org/en-US/docs/Web/API/Window/DOMContentLoaded_event
console.log("window.nostr", window.nostr)
addEventListener('DOMContentLoaded', (ev) => {
// TODO fix race condition where profile doesn't load fast enough.
damus_web_init();

View file

@ -1232,6 +1232,7 @@ async function get_pubkey() {
if (pubkey)
return pubkey
console.log("window.nostr", window.nostr)
if (window.nostr && window.nostr.getPublicKey) {
const pubkey = await window.nostr.getPublicKey()
console.log("got %s pubkey from nos2x", pubkey)