diff --git a/public/js/index.js b/public/js/index.js index ad16c65..eb38b58 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -167,11 +167,14 @@ function buildActivityHTML(activity) { : ""; const activityButtons = - (activity.buttons && activity.buttons.length > 0 + activity.buttons && activity.buttons.length > 0 ? `
${activity.buttons .map((button, index) => { - const label = typeof button === "string" ? button : button.label; + const label = + typeof button === "string" + ? button + : button.label; let url = null; if (typeof button === "object" && button.url) { url = button.url; @@ -185,12 +188,7 @@ function buildActivityHTML(activity) { .filter(Boolean) .join("")}
` - : "") + - (activity.name === "Spotify" && activity.sync_id - ? `
- Listen on Spotify -
` - : ""); + : ""; const progressBar = progress !== null @@ -323,7 +321,9 @@ async function populateReadme(data) { if (readmeSection && data.kv?.readme) { const url = data.kv.readme; try { - const res = await fetch(`/api/readme?url=${encodeURIComponent(url)}`); + const res = await fetch( + `/api/readme?url=${encodeURIComponent(url)}`, + ); if (!res.ok) throw new Error("Failed to fetch readme"); const text = await res.text(); @@ -343,7 +343,9 @@ async function updatePresence(data) { const cssLink = data.kv?.css; if (cssLink) { try { - const res = await fetch(`/api/css?url=${encodeURIComponent(cssLink)}`); + const res = await fetch( + `/api/css?url=${encodeURIComponent(cssLink)}`, + ); if (!res.ok) throw new Error("Failed to fetch CSS"); const cssText = await res.text();