Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
922de5d1d1 | |||
f15fa07880 | |||
2452acf440 | |||
e675bc4372 | |||
a1c8f5bb6e |
11
src/bg.js
11
src/bg.js
@@ -39,14 +39,13 @@ var changeIcon = function(color, currentIcon, options) {
|
||||
};
|
||||
|
||||
var generateRandomColor = function(seed) {
|
||||
var selectColor = function (colorNum, colors) {
|
||||
if (colors < 1) {
|
||||
colors = 1; // defaults to one color - avoid divide by zero
|
||||
}
|
||||
return "hsl(" + (colorNum * (360 / colors) % 360) + ",100%,50%)";
|
||||
var colors = ['#e6194b', '#3cb44b', '#ffe119', '#0082c8', '#f58231', '#FFFFFF'];
|
||||
|
||||
var selectColor = function (colorNum) {
|
||||
return colors[seed % colors.length]
|
||||
}
|
||||
|
||||
return selectColor(seed, 8);
|
||||
return selectColor(seed);
|
||||
};
|
||||
|
||||
var registerToTST = async function() {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
"description": "Color tabs based on their parent.",
|
||||
"manifest_version": 2,
|
||||
"name": "Color Tab Group",
|
||||
"version": "0.0.12",
|
||||
"version": "0.0.14",
|
||||
"homepage_url": "https://git.e.tern.al/s2/tab-groupcolor",
|
||||
"icons": {
|
||||
"48": "img/icon-48.png"
|
||||
|
Reference in New Issue
Block a user