add ify (#7)
This commit is contained in:
parent
71072cf3a3
commit
02aeca6b73
1 changed files with 23 additions and 0 deletions
23
src/plugins/ify.ts
Normal file
23
src/plugins/ify.ts
Normal file
|
@ -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}`,
|
||||
})),
|
||||
},
|
||||
]
|
||||
});
|
Loading…
Reference in a new issue