review changes
This commit is contained in:
parent
c15eee22c6
commit
abc4e0cdcf
3 changed files with 12 additions and 23 deletions
|
@ -682,11 +682,6 @@ span ~ .panel-header-text {
|
|||
opacity: 1;
|
||||
}
|
||||
|
||||
.container-info-tab-row:not(.clickable) .container-close-tab,
|
||||
.container-info-tab-row:not(.clickable):hover .container-close-tab {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.container-info-has-tabs,
|
||||
.container-info-tab-row {
|
||||
align-items: center;
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 21.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 7 7" style="enable-background:new 0 0 7 7;" xml:space="preserve">
|
||||
<g id="Symbols">
|
||||
<g id="close-glyph">
|
||||
<polygon style="fill:#4C4C4C;" points="5.8,0 3.5,2.4 1.2,0 0,1.2 2.4,3.5 0.1,5.8 1.2,7 3.5,4.7 5.8,7 7,5.8 4.7,3.5 7,1.2 "/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 7 7">
|
||||
<polygon fill="#4c4c4c" points="5.8,0 3.5,2.4 1.2,0 0,1.2 2.4,3.5 0.1,5.8 1.2,7 3.5,4.7 5.8,7 7,5.8 4.7,3.5 7,1.2"/>
|
||||
</svg>
|
Before Width: | Height: | Size: 527 B After Width: | Height: | Size: 199 B |
|
@ -778,18 +778,15 @@ Logic.registerPanel(P_CONTAINER_INFO, {
|
|||
tr.innerHTML = escaped`
|
||||
<td></td>
|
||||
<td class="container-info-tab-title truncate-text" title="${tab.url}" >${tab.title}</td>
|
||||
<td><img src="/img/container-close-tab.svg" style="width:50%;" id="close-tab" class="container-close-tab" /></td>`;
|
||||
<td><img src="/img/container-close-tab.svg" width="50%" id="${tab.id}" class="container-close-tab" /></td>`;
|
||||
tr.querySelector("td").appendChild(Utils.createFavIconElement(tab.favIconUrl));
|
||||
|
||||
document.getElementById("container-info-table").appendChild(fragment);
|
||||
|
||||
const closeTab = document.querySelector("#close-tab");
|
||||
closeTab.setAttribute("id", tab.id);
|
||||
|
||||
Logic.addEnterHandler(closeTab, async function(e) {
|
||||
await browser.tabs.remove(Number(e.target.id));
|
||||
window.close();
|
||||
});
|
||||
const closeTab = document.getElementById(tab.id);
|
||||
if(tab.hiddenState) {
|
||||
closeTab.remove();
|
||||
}
|
||||
|
||||
// On click, we activate this tab. But only if this tab is active.
|
||||
if (!tab.hiddenState) {
|
||||
|
@ -798,6 +795,10 @@ Logic.registerPanel(P_CONTAINER_INFO, {
|
|||
await browser.tabs.update(tab.id, {active: true});
|
||||
window.close();
|
||||
});
|
||||
Logic.addEnterHandler(closeTab, async function(e) {
|
||||
await browser.tabs.remove(Number(e.target.id));
|
||||
window.close();
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue