From 02aeca6b73c5ed954e229863eb71737b6618312b Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Thu, 1 Sep 2022 22:08:23 -0600 Subject: add ify (#7) --- src/plugins/ify.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/plugins/ify.ts (limited to 'src/plugins') 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}`, + })), + }, + ] +}); -- cgit