aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/ify.ts23
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}`,
+ })),
+ },
+ ]
+});