Skip to content

Commit

Permalink
feat: kill sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeIlLeone committed Oct 17, 2024
1 parent bb7e6e2 commit c55e6de
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 40 deletions.
21 changes: 0 additions & 21 deletions src/renderer/coremods/notrack/index.ts

This file was deleted.

23 changes: 6 additions & 17 deletions src/renderer/coremods/notrack/plaintextPatches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,19 @@ import type { PlaintextPatch } from "src/types";

export default [
{
find: "AnalyticsActionHandlers.handleTrack",
replacements: [
{
match: /window\.DiscordSentry=function\(\){/,
replace: "$&return;",
},
{
match: /crossDomainError=function\(\){/,
replace: "$&return;",
match: /=>\w+\.AnalyticsActionHandlers\.handle\w+\([^)]*\)/g,
replace: "=>{}",
},
],
},
{
find: "window.DiscordSentry",
replacements: [
{
match: /null!=window.DiscordSentry/g,
match: /\w+=window\.DiscordSentry/g,
replace: "false",
},
],
Expand All @@ -27,18 +24,10 @@ export default [
replacements: [{ match: /updateCrashReporter\(\w+\){/, replace: "$&return;" }],
},
{
find: "TRACKING_URL:",
replacements: [
{
replace: "",
},
],
},
{
find: /this\._metrics\.push\(.\);/,
find: /this\._metrics\.push\(.\),/,
replacements: [
{
match: /this\._metrics\.push\(.\);/,
match: /this\._metrics\.push\(.\),/,
replace: "",
},
],
Expand Down
2 changes: 0 additions & 2 deletions src/renderer/managers/coremods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export namespace coremods {
export let noDevtoolsWarning: Coremod;
export let settings: Coremod;
export let badges: Coremod;
export let notrack: Coremod;
export let installer: Coremod;
export let messagePopover: Coremod;
export let notices: Coremod;
Expand Down Expand Up @@ -59,7 +58,6 @@ export async function startAll(): Promise<void> {
coremods.watcher = await import("../coremods/watcher");
coremods.commands = await import("../coremods/commands");
coremods.welcome = await import("../coremods/welcome");
coremods.notrack = await import("../coremods/notrack");

await Promise.all(
Object.entries(coremods).map(async ([name, mod]) => {
Expand Down

0 comments on commit c55e6de

Please sign in to comment.