3 Commits

Author SHA1 Message Date
s2
724bec321b fix updateAllColorsOnAllTabs 2017-12-12 08:21:31 +01:00
s2
90f7108eee icons 2017-12-12 08:21:31 +01:00
s2
c56454a097 just text 2017-12-12 08:21:25 +01:00
4 changed files with 20 additions and 9 deletions

View File

@@ -58,7 +58,7 @@ var getTabParent = (tabs, id, currentTopLevelTabPos) => {
if (tabs[i].id === id) { if (tabs[i].id === id) {
return { return {
parentIndex: currentTopLevelTabPos, parentIndex: currentTopLevelTabPos,
faviconUrl: tabs[i].faviconUrl faviconUrl: tabs[i].favIconUrl
}; };
} else { } else {
if (tabs[i].children && tabs[i].children.length > 0) { if (tabs[i].children && tabs[i].children.length > 0) {
@@ -79,15 +79,26 @@ var updateAllColorsOnAllTabs = async () => {
window: w.id window: w.id
}); });
for (let i = 0; i < tstTabs.length; i++) { var changeTabs = (tabs) => {
if (tstTabs[i].status === 'complete') {
let t = getTabParent(tstTabs, tstTabs[i].id); for (let i = 0; i < tabs.length; i++) {
browser.tabs.executeScript(tstTabs[i].id, {
code: '(' + changeIcon.toString() + ')' + if (tabs[i].status === 'complete') {
'("' + generateRandomColor(t.parentIndex) + '", "' + t.faviconUrl + '")' let t = getTabParent(tstTabs, tabs[i].id);
}); browser.tabs.executeScript(tabs[i].id, {
code: '(' + changeIcon.toString() + ')' +
'("' + generateRandomColor(t.parentIndex) + '", "' + t.faviconUrl + '")'
});
}
if (tabs[i].children && tabs[i].children.length > 0) {
changeTabs(tabs[i].children);
}
} }
} };
changeTabs(tstTabs);
}); });
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 435 KiB

After

Width:  |  Height:  |  Size: 432 KiB