aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/noTrack.ts
blob: 13b52f89e4f7f61911b76813286eb8b8e4063e3a (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: "",
            }
        }
    ]
});