diff --git a/package-lock.json b/package-lock.json index 55bdd207..cb14e476 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nightTab", - "version": "4.29.0", + "version": "4.31.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 2a5f4273..cdcecc5c 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/src/js/theme.js b/src/js/theme.js index f4d5763e..b1d4c526 100644 --- a/src/js/theme.js +++ b/src/js/theme.js @@ -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 + ")"); diff --git a/src/js/version.js b/src/js/version.js index 55caaee6..3365d32f 100644 --- a/src/js/version.js +++ b/src/js/version.js @@ -1,6 +1,6 @@ var version = (function() { - var current = "4.29.0"; + var current = "4.31.0"; var name = "Naughty Goose"; diff --git a/src/manifest.json b/src/manifest.json index 02c987e5..fe5fde17 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -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"