mirror of
https://github.com/zombieFox/nightTab.git
synced 2025-01-08 15:09:30 +01:00
[refactor] switch to rounding theme colours
This commit is contained in:
parent
b734855510
commit
db0e51505b
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nightTab",
|
||||
"version": "4.29.0",
|
||||
"version": "4.31.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nightTab",
|
||||
"version": "4.29.0",
|
||||
"version": "4.31.0",
|
||||
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
@ -139,9 +139,9 @@ var theme = (function() {
|
||||
object: state.get.current(),
|
||||
path: "theme.accent.rgb",
|
||||
newValue: {
|
||||
r: parseInt(rgb.r, 10),
|
||||
g: parseInt(rgb.g, 10),
|
||||
b: parseInt(rgb.b, 10)
|
||||
r: Math.round(rgb.r),
|
||||
g: Math.round(rgb.g),
|
||||
b: Math.round(rgb.b)
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -155,9 +155,9 @@ var theme = (function() {
|
||||
object: state.get.current(),
|
||||
path: "theme.color.hsl",
|
||||
newValue: {
|
||||
h: parseInt(hsl.h, 10),
|
||||
s: parseInt(hsl.s, 10),
|
||||
l: parseInt(hsl.l, 10)
|
||||
h: Math.round(hsl.h),
|
||||
s: Math.round(hsl.s),
|
||||
l: Math.round(hsl.l)
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -167,9 +167,9 @@ var theme = (function() {
|
||||
object: state.get.current(),
|
||||
path: "theme.color.rgb",
|
||||
newValue: {
|
||||
r: parseInt(rgb.r, 10),
|
||||
g: parseInt(rgb.g, 10),
|
||||
b: parseInt(rgb.b, 10)
|
||||
r: Math.round(rgb.r),
|
||||
g: Math.round(rgb.g),
|
||||
b: Math.round(rgb.b)
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -1381,7 +1381,7 @@ var theme = (function() {
|
||||
} else if (rgb[key] > 255) {
|
||||
rgb[key] = 255;
|
||||
};
|
||||
rgb[key] = parseInt(rgb[key], 10);
|
||||
rgb[key] = Math.round(rgb[key]);
|
||||
};
|
||||
if (index < 10) {
|
||||
index = "0" + index;
|
||||
@ -1550,7 +1550,7 @@ var theme = (function() {
|
||||
} else if (rgb[colorKey] > 255) {
|
||||
rgb[colorKey] = 255;
|
||||
};
|
||||
rgb[colorKey] = parseInt(rgb[colorKey], 10);
|
||||
rgb[colorKey] = Math.round(rgb[colorKey]);
|
||||
};
|
||||
var themePresetBackground = helper.node("span|class:theme-preset-background-0" + i);
|
||||
themePresetBackground.style.setProperty("background-color", "rgb(" + rgb.r + ", " + rgb.g + ", " + rgb.b + ")");
|
||||
@ -1633,7 +1633,7 @@ var theme = (function() {
|
||||
} else if (rgb[colorKey] > 255) {
|
||||
rgb[colorKey] = 255;
|
||||
};
|
||||
rgb[colorKey] = parseInt(rgb[colorKey], 10);
|
||||
rgb[colorKey] = Math.round(rgb[colorKey]);
|
||||
};
|
||||
var themeCustomBackground = helper.node("span|class:theme-custom-background-0" + i);
|
||||
themeCustomBackground.style.setProperty("background-color", "rgb(" + rgb.r + ", " + rgb.g + ", " + rgb.b + ")");
|
||||
|
@ -1,6 +1,6 @@
|
||||
var version = (function() {
|
||||
|
||||
var current = "4.29.0";
|
||||
var current = "4.31.0";
|
||||
|
||||
var name = "Naughty Goose";
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
"name": "nightTab",
|
||||
"short_name": "nightTab",
|
||||
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
|
||||
"version": "4.29.0",
|
||||
"version": "4.31.0",
|
||||
"manifest_version": 2,
|
||||
"chrome_url_overrides": {
|
||||
"newtab": "index.html"
|
||||
|
Loading…
Reference in New Issue
Block a user