Fix broken patches
This commit is contained in:
parent
96873ccef7
commit
df6ffd90e3
|
@ -18,13 +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";
|
||||||
|
|
||||||
// FIXME Do this without monkey patching maybe
|
|
||||||
Object.defineProperty(window, "DiscordSentry", {
|
|
||||||
configurable: true,
|
|
||||||
set(v) { }
|
|
||||||
});
|
|
||||||
|
|
||||||
const settings = definePluginSettings({
|
const settings = definePluginSettings({
|
||||||
disableAnalytics: {
|
disableAnalytics: {
|
||||||
|
@ -52,13 +46,6 @@ export default definePlugin({
|
||||||
replace: "()=>{}",
|
replace: "()=>{}",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
|
||||||
find: "window.DiscordSentry=",
|
|
||||||
replacement: {
|
|
||||||
match: /^.+$/,
|
|
||||||
replace: "()=>{}",
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
find: ".METRICS,",
|
find: ".METRICS,",
|
||||||
replacement: [
|
replacement: [
|
||||||
|
@ -80,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");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue