Files
inscriboor/extension/app.js
T

18 lines
727 B
JavaScript
Raw Normal View History

'use strict';
const descriptions = {
Nostr: 'Identities, events, and relays.',
Wallet: 'BTC accounts, balances, and transaction review.',
Inscribe: 'Content and inscription transaction preparation.',
Chain: 'Chain inspection and isolated test-network experiments.'
};
const buttons = document.querySelectorAll('[data-feature]');
for (const button of buttons) {
button.addEventListener('click', () => {
const feature = button.dataset.feature;
document.querySelector('#feature').textContent = feature;
document.querySelector('#description').textContent = descriptions[feature];
for (const candidate of buttons) {
candidate.setAttribute('aria-pressed', String(candidate === button));
}
});
}