aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorCynthia Foxwell <gamers@riseup.net>2022-09-01 22:08:23 -0600
committerGitHub <noreply@github.com>2022-09-02 06:08:23 +0200
commit02aeca6b73c5ed954e229863eb71737b6618312b (patch)
tree913947a7e9c32e35dad3fa4fb9476ae22ce4a6ab /src/plugins
parent71072cf3a3a96992c99265ca641239bffadd96c3 (diff)
downloadVencord-02aeca6b73c5ed954e229863eb71737b6618312b.tar.gz
Vencord-02aeca6b73c5ed954e229863eb71737b6618312b.tar.bz2
Vencord-02aeca6b73c5ed954e229863eb71737b6618312b.zip
add ify (#7)
Diffstat (limited to 'src/plugins')
-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}`,
+ })),
+ },
+ ]
+});