Compare commits
2 Commits
52e7e13957
...
75e6a73f7f
Author | SHA1 | Date | |
---|---|---|---|
75e6a73f7f | |||
bd501edba3 |
15
src/bg.js
15
src/bg.js
@@ -111,11 +111,16 @@ var updateAllColorsOnAllTabs = async () => {
|
|||||||
if (tabs[i].status === 'complete') {
|
if (tabs[i].status === 'complete') {
|
||||||
let t = getTabParent(tstTabs, tabs[i].id);
|
let t = getTabParent(tstTabs, tabs[i].id);
|
||||||
let options = await loadOptions();
|
let options = await loadOptions();
|
||||||
|
let tabHost = new URL(tabs[i].url).host;
|
||||||
browser.tabs.executeScript(tabs[i].id, {
|
if (tabHost) {
|
||||||
code: '(' + changeIcon.toString() + ')' +
|
tabHost = tabHost.toLowerCase();
|
||||||
'("' + generateRandomColor(t.parentIndex) + '", "' + t.faviconUrl + '", ' + JSON.stringify(options) + ')'
|
}
|
||||||
});
|
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) {
|
if (tabs[i].children && tabs[i].children.length > 0) {
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
"description": "Color tabs based on their parent.",
|
"description": "Color tabs based on their parent.",
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Color Tab Group",
|
"name": "Color Tab Group",
|
||||||
"version": "0.0.7",
|
"version": "0.0.8",
|
||||||
"homepage_url": "https://git.e.tern.al/s2/tab-groupcolor",
|
"homepage_url": "https://git.e.tern.al/s2/tab-groupcolor",
|
||||||
"icons": {
|
"icons": {
|
||||||
"48": "img/icon-48.png"
|
"48": "img/icon-48.png"
|
||||||
|
@@ -26,6 +26,13 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="panel-formElements-item browser-style">
|
||||||
|
<label for="ignore">Ignore hosts (one per line - ex.: google.com):</label>
|
||||||
|
</div>
|
||||||
|
<div class="panel-formElements-item browser-style">
|
||||||
|
<textarea id="ignore"></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
@@ -18,7 +18,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
var list = document.querySelectorAll('select,input');
|
var list = document.querySelectorAll('select,input,textarea');
|
||||||
for (var i = 0; i < list.length; i++) {
|
for (var i = 0; i < list.length; i++) {
|
||||||
list[i].addEventListener('change', (ev) => {
|
list[i].addEventListener('change', (ev) => {
|
||||||
persistOptions();
|
persistOptions();
|
||||||
|
Reference in New Issue
Block a user