mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-01-25 16:56:23 +00:00
20 lines
681 B
TypeScript
20 lines
681 B
TypeScript
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;",
|
|
}, ...["SPEAKING", "VOICE_STATE_UPDATES", "MEDIA_ENGINE_SET_DESKTOP_SOURCE"].map(event => ({
|
|
match: new RegExp(`${event}:function\\(.\\){.+?}(,|}\\))`),
|
|
replace: (_, ending) => `${event}:function(){}${ending}`,
|
|
})),
|
|
],
|
|
},
|
|
]
|
|
});
|