Fix console error stacks. (#874)
This commit is contained in:
parent
f8e2c2f762
commit
d25e56cc23
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue