From 6212f47084befc9aaaed3338a80855200454284c Mon Sep 17 00:00:00 2001 From: creations Date: Sun, 27 Apr 2025 17:57:53 -0400 Subject: [PATCH] add spotify button based on sync id --- public/js/index.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/public/js/index.js b/public/js/index.js index eb38b58..e6ae8fb 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -167,7 +167,7 @@ function buildActivityHTML(activity) { : ""; const activityButtons = - activity.buttons && activity.buttons.length > 0 + (activity.buttons && activity.buttons.length > 0 ? `
${activity.buttons .map((button, index) => { @@ -188,7 +188,12 @@ function buildActivityHTML(activity) { .filter(Boolean) .join("")}
` - : ""; + : "") + + (activity.name === "Spotify" && activity.sync_id + ? `
+ Listen on Spotify +
` + : ""); const progressBar = progress !== null