diff --git a/mods/core/enhancerMenu.js b/mods/core/enhancerMenu.js
index 72d9edc..7e59c47 100644
--- a/mods/core/enhancerMenu.js
+++ b/mods/core/enhancerMenu.js
@@ -44,23 +44,6 @@ window['__start'] = async () => {
: store(args[0], { ...mod.defaults, ...args[1] });
};
- for (let mod of modules.loaded) {
- if (
- mod.alwaysActive ||
- store('mods', { [mod.id]: { enabled: false } })[mod.id].enabled
- ) {
- const fileExists = (file) => fs.pathExistsSync(path.resolve(file));
- for (let sheet of ['menu', 'variables']) {
- if (fileExists(`${__dirname}/../${mod.dir}/${sheet}.css`)) {
- document.head.appendChild(
- createElement(
- ``
- )
- );
- }
- }
- }
- }
electron.ipcRenderer.send('enhancer:get-app-theme');
electron.ipcRenderer.on('enhancer:set-app-theme', (event, theme) => {
document.body.className = `notion-${theme}-theme`;
@@ -509,15 +492,10 @@ window['__start'] = async () => {
return $opt;
}
- const $modules = document.querySelector('#modules');
+ const $modules = document.querySelector('#modules'),
+ fileExists = (file) => fs.pathExistsSync(path.resolve(file));
for (let mod of modules.loaded) {
- for (let font of mod.fonts || []) {
- document
- .querySelector('head')
- .appendChild(createElement(``));
- }
-
const enabled =
mod.alwaysActive ||
store('mods', {
@@ -531,8 +509,21 @@ window['__start'] = async () => {
link: `https://github.com/${mod.author}`,
avatar: `https://github.com/${mod.author}.png`,
};
+ if (enabled) {
+ for (let sheet of ['menu', 'variables']) {
+ if (fileExists(`${__dirname}/../${mod.dir}/${sheet}.css`)) {
+ document.head.appendChild(
+ createElement(
+ ``
+ )
+ );
+ }
+ }
+ }
mod.elem = createElement(`
-