Compare commits
3 Commits
81f731ad77
...
724bec321b
Author | SHA1 | Date | |
---|---|---|---|
724bec321b | |||
90f7108eee | |||
c56454a097 |
21
src/bg.js
21
src/bg.js
@@ -58,7 +58,7 @@ var getTabParent = (tabs, id, currentTopLevelTabPos) => {
|
||||
if (tabs[i].id === id) {
|
||||
return {
|
||||
parentIndex: currentTopLevelTabPos,
|
||||
faviconUrl: tabs[i].faviconUrl
|
||||
faviconUrl: tabs[i].favIconUrl
|
||||
};
|
||||
} else {
|
||||
if (tabs[i].children && tabs[i].children.length > 0) {
|
||||
@@ -79,15 +79,26 @@ var updateAllColorsOnAllTabs = async () => {
|
||||
window: w.id
|
||||
});
|
||||
|
||||
for (let i = 0; i < tstTabs.length; i++) {
|
||||
if (tstTabs[i].status === 'complete') {
|
||||
let t = getTabParent(tstTabs, tstTabs[i].id);
|
||||
browser.tabs.executeScript(tstTabs[i].id, {
|
||||
var changeTabs = (tabs) => {
|
||||
|
||||
for (let i = 0; i < tabs.length; i++) {
|
||||
|
||||
if (tabs[i].status === 'complete') {
|
||||
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 |
BIN
src/img/icon.png
BIN
src/img/icon.png
Binary file not shown.
Before Width: | Height: | Size: 435 KiB After Width: | Height: | Size: 432 KiB |
Reference in New Issue
Block a user