aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/noTrack.ts
blob: b82c83f24fb86923f106eaa60aa3ba2c15df674b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import definePlugin from "../utils/types";
import { Devs } from "../utils/constants";

export default definePlugin({
    name: "NoTrack",
    description: "Disable Discord's tracking and crash reporting",
    authors: [Devs.Cyn],
    required: true,
    patches: [
        {
            find: "TRACKING_URL:",
            replacement: {
                match: /^.+$/,
                replace: "()=>{}",
            },
        },
        {
            find: "window.DiscordSentry=",
            replacement: {
                match: /window\.DiscordSentry=function.+\}\(\)/,
                replace: "",
            }
        }
    ]
});