diff options
author | Drake <53356436+Ruthenic@users.noreply.github.com> | 2022-10-04 13:26:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-04 22:26:56 +0200 |
commit | dafbd39113c292c4e02aec56bdac9225eb472a0a (patch) | |
tree | e50bd717a9db59b6fe5f125c867bf1222ac5196a /src/plugins/ify.ts | |
parent | 88542b9ede71fd89b1edef41175131aa0dc5027f (diff) | |
download | Vencord-dafbd39113c292c4e02aec56bdac9225eb472a0a.tar.gz Vencord-dafbd39113c292c4e02aec56bdac9225eb472a0a.tar.bz2 Vencord-dafbd39113c292c4e02aec56bdac9225eb472a0a.zip |
Fix ify not preventing auto-pausing without premium (#28)
Diffstat (limited to 'src/plugins/ify.ts')
-rw-r--r-- | src/plugins/ify.ts | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/plugins/ify.ts b/src/plugins/ify.ts index 40a9708..2b5d86f 100644 --- a/src/plugins/ify.ts +++ b/src/plugins/ify.ts @@ -5,17 +5,14 @@ export default definePlugin({ name: "Ify", description: "Disabes Spotify auto-pausing and premium checks", authors: [Devs.Cyn], - patches: [ - { - find: '.displayName="SpotifyStore"', - replacement: [{ - match: /\.isPremium=.;/, - replace: ".isPremium=true;", - }, ...["SPEAKING", "VOICE_STATE_UPDATES", "MEDIA_ENGINE_SET_DESKTOP_SOURCE"].map(event => ({ - match: new RegExp(`${event}:function\\(.\\){.+?}(,|}\\))`), - replace: (_, ending) => `${event}:function(){}${ending}`, - })), - ], - }, - ] + patches: [{ + find: '.displayName="SpotifyStore"', + replacement: [{ + match: /\.isPremium=.;/, + replace: ".isPremium=true;" + }, { + match: /function (.{1,2})\(\).{0,200}SPOTIFY_AUTO_PAUSED\);.{0,}}}}/, + replace: "function $1(){}" + }] + }] }); |