update
This commit is contained in:
@@ -129,13 +129,12 @@ async function handleNip07Request(request) {
|
||||
}
|
||||
}
|
||||
|
||||
function updateStatus(message, status) {
|
||||
const statusEl = document.getElementById('nip07-proxy-status');
|
||||
if (statusEl) {
|
||||
statusEl.textContent = message;
|
||||
statusEl.style = status === "connected" ?
|
||||
"color: green; font-weight: bold;" :
|
||||
"color: red; font-weight: bold;";
|
||||
function updateStatus(message, state) {
|
||||
const container = document.getElementById('nip07-status');
|
||||
const textEl = document.getElementById('nip07-status-text');
|
||||
if (container && textEl) {
|
||||
container.className = 'status status--' + state;
|
||||
textEl.textContent = message;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,10 +145,10 @@ window.addEventListener('load', () => {
|
||||
// Check if NIP-07 extension is available
|
||||
if (window.nostr) {
|
||||
console.log('NIP-07 extension detected');
|
||||
updateStatus('Connected to NIP-07 extension - Ready', 'connected');
|
||||
updateStatus('Connected — ready', 'connected');
|
||||
} else {
|
||||
console.log('NIP-07 extension not found');
|
||||
updateStatus('NIP-07 extension not found', 'error');
|
||||
updateStatus('No NIP-07 extension found', 'error');
|
||||
}
|
||||
|
||||
// Start polling every 500 ms
|
||||
|
||||
Reference in New Issue
Block a user