Merge branch 'dev' into modules-proxy-patches

This commit is contained in:
Nuckyz 2024-06-28 00:57:36 -03:00
commit d95367b31d
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
2 changed files with 14 additions and 11 deletions

View file

@ -18,7 +18,7 @@
import { definePluginSettings } from "@api/Settings"; import { definePluginSettings } from "@api/Settings";
import { Devs } from "@utils/constants"; import { Devs } from "@utils/constants";
import definePlugin, { OptionType } from "@utils/types"; import definePlugin, { OptionType, StartAt } from "@utils/types";
const settings = definePluginSettings({ const settings = definePluginSettings({
disableAnalytics: { disableAnalytics: {
@ -46,13 +46,6 @@ export default definePlugin({
replace: "()=>{}", replace: "()=>{}",
}, },
}, },
{
find: "window.DiscordSentry=",
replacement: {
match: /^.+$/,
replace: "()=>{}",
}
},
{ {
find: ".METRICS,", find: ".METRICS,",
replacement: [ replacement: [
@ -74,5 +67,15 @@ export default definePlugin({
replace: "getDebugLogging(){return false;" replace: "getDebugLogging(){return false;"
} }
}, },
] ],
startAt: StartAt.Init,
start() {
Object.defineProperty(window, "DiscordSentry", {
configurable: true,
set() {
Reflect.deleteProperty(window, "DiscordSentry");
}
});
}
}); });

View file

@ -110,8 +110,8 @@ export default definePlugin({
find: '"pepe","nude"', find: '"pepe","nude"',
predicate: () => settings.store.disableDisallowedDiscoveryFilters, predicate: () => settings.store.disableDisallowedDiscoveryFilters,
replacement: { replacement: {
match: /\?\["pepe",.+?\]/, match: /(?<=[?=])\["pepe",.+?\]/,
replace: "?[]", replace: "[]",
}, },
}, },
// patch request that queries if term is allowed // patch request that queries if term is allowed