diff options
author | Cynthia Foxwell <gamers@riseup.net> | 2022-09-01 22:08:23 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-02 06:08:23 +0200 |
commit | 02aeca6b73c5ed954e229863eb71737b6618312b (patch) | |
tree | 913947a7e9c32e35dad3fa4fb9476ae22ce4a6ab | |
parent | 71072cf3a3a96992c99265ca641239bffadd96c3 (diff) | |
download | Vencord-02aeca6b73c5ed954e229863eb71737b6618312b.tar.gz Vencord-02aeca6b73c5ed954e229863eb71737b6618312b.tar.bz2 Vencord-02aeca6b73c5ed954e229863eb71737b6618312b.zip |
add ify (#7)
-rw-r--r-- | src/plugins/ify.ts | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/plugins/ify.ts b/src/plugins/ify.ts new file mode 100644 index 0000000..76cfa59 --- /dev/null +++ b/src/plugins/ify.ts @@ -0,0 +1,23 @@ +import definePlugin from "../utils/types"; + +export default definePlugin({ + name: "Ify", + description: "Disabes Spotify auto-pausing and premium checks", + author: "Cynosphere", + patches: [ + { + find: '.displayName="SpotifyStore"', + replacement: { + match: /\.isPremium=.;/, + replace: ".isPremium=true;", + }, + }, + { + find: '.displayName="SpotifyStore"', + replacement: ["SPEAKING", "VOICE_STATE_UPDATES", "MEDIA_ENGINE_SET_DESKTOP_SOURCE"].map(event => ({ + match: new RegExp(`${event}:function\\(.\\){.+?}(,|}\\))`), + replace: (_, ending) => `${event}:function(){}${ending}`, + })), + }, + ] +}); |