Fix console error stacks. (#874)

This commit is contained in:
Strencher 2021-07-08 00:08:50 +02:00 committed by GitHub
parent f8e2c2f762
commit d25e56cc23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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;