Skip to content

Commit

Permalink
[antitrack] fix antitrack not antitracking
Browse files Browse the repository at this point in the history
  • Loading branch information
ioj4 authored and yellowsink committed Feb 19, 2024
1 parent b08334b commit ea265c6
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions plugins/antitrack/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const { scoped } = shelter.plugin;

// apply openasar's sentry removers
// https://github.com/GooseMod/OpenAsar/blob/7a04cb57dff43f328de78addc234e9d21ff079a8/src/mainWindow.js#L3
try {
Expand All @@ -11,15 +13,4 @@ try {
// this is not done via intercept() so that plugins can still listen for these dispatches
// as TRACK dispatches are *insanely useful*

const analyticsTest =
/client-analytics\.braintreegateway\.com|discord\.com\/api\/v9\/science/;

// ewwww XHR
export const onUnload = shelter.patcher.instead(
"send",
XMLHttpRequest.prototype,
function (args, orig) {
if (!analyticsTest.test(this.__sentry_xhr__?.url))
return orig.apply(this, args);
},
);
scoped.http.intercept("POST", /^\/science|^\/error-reporting-proxy/, () => {});

0 comments on commit ea265c6

Please sign in to comment.