4 Commits

Author SHA1 Message Date
s2
bc067d663e change defaults 2017-12-14 07:46:05 +01:00
s2
922de5d1d1 v0.0.14 2017-12-13 16:47:04 +01:00
s2
f15fa07880 remove console log 2017-12-13 16:44:59 +01:00
s2
2452acf440 use fixed colors 2017-12-13 15:54:20 +01:00
3 changed files with 9 additions and 10 deletions

View File

@@ -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, 7);
return selectColor(seed);
};
var registerToTST = async function() {

View File

@@ -2,7 +2,7 @@
"description": "Color tabs based on their parent.",
"manifest_version": 2,
"name": "Color Tab Group",
"version": "0.0.13",
"version": "0.0.14",
"homepage_url": "https://git.e.tern.al/s2/tab-groupcolor",
"icons": {
"48": "img/icon-48.png"

View File

@@ -1,9 +1,9 @@
function loadOptions() {
return browser.storage.local.get({
globals: {
width: 3,
orientation: 'vertical',
ignore: ''
width: 5,
orientation: 'horizontal',
ignore: 'web.whatsapp.com'
}
});
}