diff --git a/webextension/css/popup.css b/webextension/css/popup.css index aed9df4..7e1d806 100644 --- a/webextension/css/popup.css +++ b/webextension/css/popup.css @@ -17,7 +17,7 @@ table { padding: 0; } -.header-icon { +.icon { max-width: 16px; height: 16px; margin: 4px; @@ -39,12 +39,6 @@ table.unstriped tbody tr { height: 32px; } -.hideorshow-icon { - max-width: 16px; - height: 16px; - margin: 4px; -} - .edit-identities { background: #DCDBDC; } diff --git a/webextension/js/popup.js b/webextension/js/popup.js index d9b1f1b..e5cb33b 100644 --- a/webextension/js/popup.js +++ b/webextension/js/popup.js @@ -51,16 +51,21 @@ browser.runtime.sendMessage({method: 'query'}).then(identities=> { } const identityRow = ` -
+ +
+
+ ${identity.name} + + + @@ -74,9 +79,9 @@ browser.runtime.sendMessage({method: 'query'}).then(identities=> { rows.forEach(row=> { row.addEventListener('click', e=> { - if (e.target.matches('.hideorshow-icon')) { - const containerId = e.target.dataset.identityCookieStoreId; + const containerId = e.target.parentElement.parentElement.dataset.identityCookieStoreId; + if (e.target.matches('.hideorshow-icon')) { browser.runtime.sendMessage({method: 'getIdentitiesState'}).then(identitiesState=> { if (identitiesState[containerId].hiddenTabUrls.length) { showContainerTabs(containerId); @@ -84,6 +89,9 @@ browser.runtime.sendMessage({method: 'query'}).then(identities=> { hideContainerTabs(containerId); } }); + } else if (e.target.matches('.newtab-icon')) { + browser.tabs.create({cookieStoreId: containerId}); + window.close(); } }); }); diff --git a/webextension/popup.html b/webextension/popup.html index d79c7e4..9edcc6f 100644 --- a/webextension/popup.html +++ b/webextension/popup.html @@ -8,13 +8,13 @@