Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
bc067d663e | |||
922de5d1d1 | |||
f15fa07880 | |||
2452acf440 |
11
src/bg.js
11
src/bg.js
@@ -39,14 +39,13 @@ var changeIcon = function(color, currentIcon, options) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var generateRandomColor = function(seed) {
|
var generateRandomColor = function(seed) {
|
||||||
var selectColor = function (colorNum, colors) {
|
var colors = ['#e6194b', '#3cb44b', '#ffe119', '#0082c8', '#f58231', '#FFFFFF'];
|
||||||
if (colors < 1) {
|
|
||||||
colors = 1; // defaults to one color - avoid divide by zero
|
var selectColor = function (colorNum) {
|
||||||
}
|
return colors[seed % colors.length]
|
||||||
return "hsl(" + (colorNum * (360 / colors) % 360) + ",100%,50%)";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return selectColor(seed, 7);
|
return selectColor(seed);
|
||||||
};
|
};
|
||||||
|
|
||||||
var registerToTST = async function() {
|
var registerToTST = async function() {
|
||||||
|
@@ -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.13",
|
"version": "0.0.14",
|
||||||
"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"
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
function loadOptions() {
|
function loadOptions() {
|
||||||
return browser.storage.local.get({
|
return browser.storage.local.get({
|
||||||
globals: {
|
globals: {
|
||||||
width: 3,
|
width: 5,
|
||||||
orientation: 'vertical',
|
orientation: 'horizontal',
|
||||||
ignore: ''
|
ignore: 'web.whatsapp.com'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user