From 5e10467bf782847a225772581213f7a39b48a8d0 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Fri, 21 May 2021 19:27:32 +0200 Subject: [PATCH] Fix theme loading --- preload.js | 4 ++-- utils/theme.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/preload.js b/preload.js index 92be85f..1213095 100644 --- a/preload.js +++ b/preload.js @@ -2,13 +2,13 @@ const customTitlebar = require("custom-electron-titlebar"); const electronLocalshortcut = require("electron-localshortcut"); const { remote } = require("electron"); const ArmCord = require("./utils/ArmCord.js"); - +require("./utils/theme.js"); window.addEventListener("DOMContentLoaded", () => { new customTitlebar.Titlebar({ backgroundColor: customTitlebar.Color.fromHex("#202225"), menu: false, }); - require("./utils/theme.js"); + const currentWindow = remote.getCurrentWindow(); electronLocalshortcut.register(currentWindow, "F5", () => { location.reload(); diff --git a/utils/theme.js b/utils/theme.js index 8d0ce72..0cd3774 100644 --- a/utils/theme.js +++ b/utils/theme.js @@ -1,8 +1,8 @@ const fs = require("fs"); const armcord = require("./armcord.js"); const themeFolder = __dirname + "/themes/"; -console.log("Theme Module Loaded") window.addEventListener("DOMContentLoaded", () => { + console.log("Theme Module Loaded"); fs.readdirSync(themeFolder).forEach((file) => { console.log(file); try {