From 01eeaeaa6af76b20f54a6ddb4220f9294b490a42 Mon Sep 17 00:00:00 2001 From: foxster-mp4 Date: Mon, 1 May 2023 09:01:06 -0700 Subject: [PATCH] Fix tint color setting --- js/app.js | 2 +- js/main.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/js/app.js b/js/app.js index 2d1a3bf..98ae6ac 100644 --- a/js/app.js +++ b/js/app.js @@ -30,7 +30,7 @@ function main(json) { // Set tab title document.title = `${app.name} - ${json.name}`; - const tintColor = `#${app.tintColor}`; + const tintColor = `#${app.tintColor?.replaceAll("#", "")}`; // Set tint color if (tintColor) document.querySelector(':root').style.setProperty("--app-tint-color", `${tintColor}`); diff --git a/js/main.js b/js/main.js index bc71208..f93c067 100644 --- a/js/main.js +++ b/js/main.js @@ -15,7 +15,8 @@ fetch(sourceURL, { .then(response => response.json()) .then(json => { // Set tint color - if (json.tintColor) setTintColor(json.tintColor); + const tintColor = json.tintColor?.replaceAll("#", ""); + if (tintColor) setTintColor(tintColor); setApps(json.apps); main(json);