Merge branch 'modules-proxy-patches' into immediate-finds-modules-proxy
This commit is contained in:
commit
a6f4622837
|
@ -125,6 +125,7 @@ export default definePlugin({
|
||||||
|
|
||||||
set() {
|
set() {
|
||||||
new Logger("NoTrack", "#8caaee").error("Failed to disable Sentry. Falling back to deleting window.DiscordSentry");
|
new Logger("NoTrack", "#8caaee").error("Failed to disable Sentry. Falling back to deleting window.DiscordSentry");
|
||||||
|
|
||||||
Reflect.deleteProperty(Function.prototype, "g");
|
Reflect.deleteProperty(Function.prototype, "g");
|
||||||
Reflect.deleteProperty(window, "DiscordSentry");
|
Reflect.deleteProperty(window, "DiscordSentry");
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ define(Function.prototype, "m", {
|
||||||
// We may also catch Discord bundled libs, React Devtools or other extensions WebpackInstance here.
|
// We may also catch Discord bundled libs, React Devtools or other extensions WebpackInstance here.
|
||||||
// This ensures we actually got the right ones
|
// This ensures we actually got the right ones
|
||||||
const { stack } = new Error();
|
const { stack } = new Error();
|
||||||
if (!(stack?.includes("discord.com") || stack?.includes("discordapp.com")) || Array.isArray(originalModules)) {
|
if (!(stack?.includes("discord.com") || stack?.includes("discordapp.com")) || (stack != null ? /at \d+? \(/.test(stack) : true) || !String(this).includes("exports:{}")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ define(Function.prototype, "m", {
|
||||||
define(this, "p", { value: bundlePath });
|
define(this, "p", { value: bundlePath });
|
||||||
clearTimeout(setterTimeout);
|
clearTimeout(setterTimeout);
|
||||||
|
|
||||||
if (bundlePath !== "/assets/") return;
|
if (window.GLOBAL_ENV?.PUBLIC_PATH != null && bundlePath !== window.GLOBAL_ENV.PUBLIC_PATH) return;
|
||||||
|
|
||||||
logger.info("Main Webpack found" + interpolateIfDefined` in ${fileName}` + ", initializing internal references to WebpackRequire");
|
logger.info("Main Webpack found" + interpolateIfDefined` in ${fileName}` + ", initializing internal references to WebpackRequire");
|
||||||
_initWebpack(this);
|
_initWebpack(this);
|
||||||
|
|
Loading…
Reference in a new issue