mirror of
https://github.com/driftywinds/driftywinds.github.io.git
synced 2025-12-19 11:03:32 +00:00
Fix tint color setting
This commit is contained in:
@@ -30,7 +30,7 @@ function main(json) {
|
|||||||
// Set tab title
|
// Set tab title
|
||||||
document.title = `${app.name} - ${json.name}`;
|
document.title = `${app.name} - ${json.name}`;
|
||||||
|
|
||||||
const tintColor = `#${app.tintColor}`;
|
const tintColor = `#${app.tintColor?.replaceAll("#", "")}`;
|
||||||
// Set tint color
|
// Set tint color
|
||||||
if (tintColor) document.querySelector(':root').style.setProperty("--app-tint-color", `${tintColor}`);
|
if (tintColor) document.querySelector(':root').style.setProperty("--app-tint-color", `${tintColor}`);
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ fetch(sourceURL, {
|
|||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(json => {
|
.then(json => {
|
||||||
// Set tint color
|
// Set tint color
|
||||||
if (json.tintColor) setTintColor(json.tintColor);
|
const tintColor = json.tintColor?.replaceAll("#", "");
|
||||||
|
if (tintColor) setTintColor(tintColor);
|
||||||
|
|
||||||
setApps(json.apps);
|
setApps(json.apps);
|
||||||
main(json);
|
main(json);
|
||||||
|
|||||||
Reference in New Issue
Block a user