diff --git a/src/bg.js b/src/bg.js index 42142d6..616700f 100644 --- a/src/bg.js +++ b/src/bg.js @@ -111,11 +111,16 @@ var updateAllColorsOnAllTabs = async () => { if (tabs[i].status === 'complete') { let t = getTabParent(tstTabs, tabs[i].id); let options = await loadOptions(); - - browser.tabs.executeScript(tabs[i].id, { - code: '(' + changeIcon.toString() + ')' + - '("' + generateRandomColor(t.parentIndex) + '", "' + t.faviconUrl + '", ' + JSON.stringify(options) + ')' - }); + let tabHost = new URL(tabs[i].url).host; + if (tabHost) { + tabHost = tabHost.toLowerCase(); + } + if (!(options.ignore && options.ignore.split('\n').includes(tabHost))) { + browser.tabs.executeScript(tabs[i].id, { + code: '(' + changeIcon.toString() + ')' + + '("' + generateRandomColor(t.parentIndex) + '", "' + t.faviconUrl + '", ' + JSON.stringify(options) + ')' + }); + } } if (tabs[i].children && tabs[i].children.length > 0) { diff --git a/src/options/options.html b/src/options/options.html index 13cf5a1..f43b565 100644 --- a/src/options/options.html +++ b/src/options/options.html @@ -26,6 +26,13 @@ +