aboutsummaryrefslogtreecommitdiff
path: root/src/utils/quickCss.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/quickCss.ts')
-rw-r--r--src/utils/quickCss.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/utils/quickCss.ts b/src/utils/quickCss.ts
index 4ae1023..1b3f78d 100644
--- a/src/utils/quickCss.ts
+++ b/src/utils/quickCss.ts
@@ -18,7 +18,6 @@
import { addSettingsListener, Settings } from "@api/settings";
-import IpcEvents from "./IpcEvents";
let style: HTMLStyleElement;
let themesStyle: HTMLStyleElement;
@@ -29,8 +28,8 @@ export async function toggle(isEnabled: boolean) {
style = document.createElement("style");
style.id = "vencord-custom-css";
document.head.appendChild(style);
- VencordNative.ipc.on(IpcEvents.QUICK_CSS_UPDATE, (_, css: string) => style.textContent = css);
- style.textContent = await VencordNative.ipc.invoke(IpcEvents.GET_QUICK_CSS);
+ VencordNative.quickCss.addChangeListener(css => style.textContent = css);
+ style.textContent = await VencordNative.quickCss.get();
}
} else
style.disabled = !isEnabled;