for #5: start browser action UI
This commit is contained in:
@@ -4,8 +4,14 @@ browser.runtime.sendMessage('get-identities').then(reply=> {
|
||||
if (reply) {
|
||||
reply.content.identities.forEach(identity=> {
|
||||
const identityName = identity.l10nID.match(/userContext(\w*)\.label/)[IDENTITY_L10NID_MATCH_INDEX];
|
||||
const identityRow = `
|
||||
<tr>
|
||||
<td>i</td>
|
||||
<td>${identityName}</td>
|
||||
<td>></td>
|
||||
</tr>`;
|
||||
|
||||
document.querySelector('.identities-list').innerHTML += `<li><a href="#">${identityName}</a></li>`;
|
||||
document.querySelector('.identities-list').innerHTML += identityRow;
|
||||
});
|
||||
console.log('response from sdk addon: ', reply.content);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user