From d25e56cc23d5f82144d4d459cb0e91740d76e21f Mon Sep 17 00:00:00 2001 From: Strencher <46447572+Strencher@users.noreply.github.com> Date: Thu, 8 Jul 2021 00:08:50 +0200 Subject: [PATCH] Fix console error stacks. (#874) --- renderer/src/modules/pluginmanager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderer/src/modules/pluginmanager.js b/renderer/src/modules/pluginmanager.js index 94a8f95a..f0221987 100644 --- a/renderer/src/modules/pluginmanager.js +++ b/renderer/src/modules/pluginmanager.js @@ -103,7 +103,7 @@ export default new class PluginManager extends AddonManager { window.__filename = path.basename(module.filename); window.__dirname = this.addonFolder; const wrapped = `(${vm.compileFunction(fileContent, ["exports", "require", "module", "__filename", "__dirname"]).toString()})`; - const final = `${wrapped}(window.module.exports, window.require, window.module, window.__filename, window.__dirname)`; + const final = `${wrapped}(window.module.exports, window.require, window.module, window.__filename, window.__dirname)\n//# sourceURL=betterdiscord://plugins/${window.__filename}`; const container = document.createElement("script"); container.innerHTML = final;