From e00ef94e6ddacf40b23b4368609307e0978368d7 Mon Sep 17 00:00:00 2001 From: GravityScriptsV2 <95504918+GravityScriptsV2@users.noreply.github.com> Date: Sat, 8 Jun 2024 16:25:50 -0700 Subject: [PATCH 1/4] Update README.md --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 87bed15..31c079a 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,10 @@ If you don't want people seeing the profile you have on Discord, append the quer If you don't want people seeing the your activity, append the query param `hideActivity=true` to the end of the URL or use `hideActivity=whenNotUsed` to hide activity section when there's no activity to display. Activity are shown by default. +### ___Hide Spotify___ + +If you don't want people seeing your Spotify activity, append the query param `hideSpotify=true` to the end of the URL. Spotify activity is shown by default. + ### ___Hide App by ID___ If you don't want display a specific application, append the query param `ignoreAppId=:app_id` to the end of the URL, IDs separate by `,`. From bef4538a03d15840a5209f69b6dd61f88b4fcad3 Mon Sep 17 00:00:00 2001 From: GravityScriptsV2 <95504918+GravityScriptsV2@users.noreply.github.com> Date: Sat, 8 Jun 2024 16:32:40 -0700 Subject: [PATCH 2/4] Update renderCard.tsx --- src/renderCard.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/renderCard.tsx b/src/renderCard.tsx index 35841b6..a524d6f 100644 --- a/src/renderCard.tsx +++ b/src/renderCard.tsx @@ -16,6 +16,7 @@ type Parameters = { hideBadges?: string; hideProfile?: string; hideActivity?: string; + hideSpotify?: string; ignoreAppId?: string; showDisplayName?: string; borderRadius?: string; @@ -69,6 +70,7 @@ const renderCard = async (body: LanyardTypes.Root, params: Parameters): Promise< let hideBadges = parseBool(params.hideBadges); let hideProfile = parseBool(params.hideProfile); let hideActivity = params.hideActivity ?? "false"; + let hideSpotify = parseBool(params.hideSpotify); let ignoreAppId = parseAppId(params.ignoreAppId); let hideDiscrim = parseBool(params.hideDiscrim); let showDisplayName = parseBool(params.showDisplayName); @@ -136,6 +138,7 @@ const renderCard = async (body: LanyardTypes.Root, params: Parameters): Promise< if (hideProfile) return "130"; if (hideActivity === "true") return "91"; if (hideActivity === "whenNotUsed" && !activity && !data.listening_to_spotify) return "91"; + if (hideSpotify && data.listening_to_spotify) return "91"; return "210"; } @@ -144,6 +147,7 @@ const renderCard = async (body: LanyardTypes.Root, params: Parameters): Promise< if (hideProfile) return "120"; if (hideActivity === "true") return "81"; if (hideActivity === "whenNotUsed" && !activity && !data.listening_to_spotify) return "81"; + if (hideSpotify && data.listening_to_spotify) return "81"; return "200"; } @@ -412,7 +416,7 @@ const renderCard = async (body: LanyardTypes.Root, params: Parameters): Promise< } ${ - data.listening_to_spotify && !activity && data.activities[Object.keys(data.activities).length - 1].type === 2 + data.listening_to_spotify && !activity && !hideSpotify && data.activities[Object.keys(data.activities).length - 1].type === 2 ? `
Date: Sat, 8 Jun 2024 16:57:07 -0700 Subject: [PATCH 4/4] Update renderCard.tsx --- src/renderCard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderCard.tsx b/src/renderCard.tsx index 762e585..a8c1480 100644 --- a/src/renderCard.tsx +++ b/src/renderCard.tsx @@ -470,7 +470,7 @@ const renderCard = async (body: LanyardTypes.Root, params: Parameters): Promise< ` : `` } ${ - !activity && !data.listening_to_spotify && hideActivity === "false" + !activity && (!data.listening_to_spotify || hideSpotify) && hideActivity === "false" ? `