From 9608851fa240c93674cffe6f80a024abc5e8f5e0 Mon Sep 17 00:00:00 2001 From: smartfridge <37928912+smartfrigde@users.noreply.github.com> Date: Fri, 14 May 2021 18:01:52 +0200 Subject: [PATCH] Theme Manager test --- preload.js | 2 +- utils/theme.js | 7 +++++++ utils/themes/revertBrand.css | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 utils/theme.js create mode 100644 utils/themes/revertBrand.css diff --git a/preload.js b/preload.js index 52af680..80e8eb5 100644 --- a/preload.js +++ b/preload.js @@ -2,7 +2,7 @@ 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"), diff --git a/utils/theme.js b/utils/theme.js new file mode 100644 index 0000000..e9b5d63 --- /dev/null +++ b/utils/theme.js @@ -0,0 +1,7 @@ +const themeFolder = __dirname + "/themes/"; +const fs = require("fs"); +const armcord = require("./armcord.js") +fs.readdirSync(themeFolder).forEach((file) => { + armcord.addStyle(fs.readFileSync(file)) + console.log(file) +}); diff --git a/utils/themes/revertBrand.css b/utils/themes/revertBrand.css new file mode 100644 index 0000000..104ae18 --- /dev/null +++ b/utils/themes/revertBrand.css @@ -0,0 +1 @@ +@import url('https://Goose-Nest.github.io/GT-RevertRebrand/src/main.css'); \ No newline at end of file