mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-17 02:17:03 -04:00
Finish rewrite
This commit is contained in:
parent
c39ff8f648
commit
483bc13a31
15 changed files with 165 additions and 29 deletions
31
src/plugins/noTrack.ts
Normal file
31
src/plugins/noTrack.ts
Normal file
|
@ -0,0 +1,31 @@
|
|||
import definePlugin from "../utils/types";
|
||||
import { findByProps } from "../utils/webpack";
|
||||
|
||||
const DO_NOTHING = () => void 0;
|
||||
|
||||
export default definePlugin({
|
||||
name: "NoTrack",
|
||||
description: "Disable Discord's tracking and crash reporting",
|
||||
author: "Vendicated",
|
||||
start() {
|
||||
findByProps("getSuperPropertiesBase64", "track").track = DO_NOTHING;
|
||||
findByProps("submitLiveCrashReport").submitLiveCrashReport = DO_NOTHING;
|
||||
findByProps("AnalyticsActionHandlers").AnalyticsActionHandlers.handleTrack = DO_NOTHING;
|
||||
|
||||
const sentry = window.__SENTRY__;
|
||||
sentry.logger.disable();
|
||||
|
||||
sentry.hub.addBreadcrumb = DO_NOTHING;
|
||||
sentry.hub.getClient().close(0);
|
||||
sentry.hub.getScope().clear();
|
||||
|
||||
const c = console;
|
||||
for (const method in c) {
|
||||
if (c[method].__sentry_original__)
|
||||
c[method] = c[method].__sentry_original__;
|
||||
if (c[method].__REACT_DEVTOOLS_ORIGINAL_METHOD__?.__sentry_original__)
|
||||
c[method].__REACT_DEVTOOLS_ORIGINAL_METHOD__ = c[method].__REACT_DEVTOOLS_ORIGINAL_METHOD__.__sentry_original__;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue