Fix bugs for plugins and themes
This commit is contained in:
parent
826aa7999c
commit
66d8d7a069
|
@ -12,14 +12,15 @@ Object.defineProperty(window, "webpackJsonp", {
|
|||
electron.webFrame.top.context.global = electron.webFrame.top.context;
|
||||
electron.webFrame.top.context.require = require;
|
||||
electron.webFrame.top.context.process = process;
|
||||
electron.webFrame.top.context.Buffer = Buffer;
|
||||
|
||||
// Load Discord's original preload
|
||||
const preload = process.env.DISCORD_PRELOAD;
|
||||
if (preload) {
|
||||
|
||||
|
||||
// Restore original preload for future windows
|
||||
process.electronBinding("command_line").appendSwitch("preload", preload);
|
||||
|
||||
|
||||
// Run original preload
|
||||
try {
|
||||
const originalKill = process.kill;
|
||||
|
|
|
@ -55,6 +55,7 @@ export default new class ThemeManager extends AddonManager {
|
|||
/* Overrides */
|
||||
getFileModification(module, fileContent, meta) {
|
||||
meta.css = fileContent;
|
||||
if (meta.format == "json") meta.css = meta.css.split("\n").slice(1).join("\n");
|
||||
return `module.exports = ${JSON.stringify(meta)};`;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue