This commit is contained in:
nin0dev 2025-02-22 17:07:17 -05:00
commit 5c8ac17e02
Signed by: nin0
SSH key fingerprint: SHA256:NOoDnFVvZNFvqfXCIhzr6oCTDImZAbTTuyAysZ8Ufk8
2 changed files with 61 additions and 0 deletions

13
LICENSE Normal file
View file

@ -0,0 +1,13 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.

48
index.ts Normal file
View file

@ -0,0 +1,48 @@
/*
* Vencord, a Discord client mod
* Copyright (c) 2025 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { definePluginSettings } from "@api/Settings";
import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types";
const settings = definePluginSettings({
disableSpotify: {
default: true,
type: OptionType.BOOLEAN,
description: "Do not send track history to Discord"
},
disableGames: {
default: true,
type: OptionType.BOOLEAN,
description: "Do not send game activity to Discord"
}
});
export default definePlugin({
name: "NoActivityFeedSend",
description: "Disables sending activity/Spotify history to Discord, effectively hiding it from activity history",
authors: [Devs.nin0dev],
enabledByDefault: true,
settings,
patches: [
{
find: "for_game_profile",
replacement: {
match: /await \i.\i.post\({url:\i.\i.MY_SPOTIFY_CONTENT_INVENTORY.{0,100}}\)/,
replace: "(()=>{})()"
},
predicate: () => settings.store.disableSpotify
},
{
find: "MY_CONTENT_INVENTORY_APPLICATION(",
replacement: {
match: /await \i.\i.post\({url:\i.\i.MY_CONTENT_INVENTORY_APPLICATION.{0,100}}\)/,
replace: "(()=>{})()"
},
predicate: () => settings.store.disableGames
}
]
});