Vencord/src/utils/quickCss.ts

9 lines
367 B
TypeScript
Raw Normal View History

2022-08-31 02:07:16 +00:00
import IpcEvents from "./IpcEvents";
2022-08-29 16:11:44 +00:00
document.addEventListener("DOMContentLoaded", async () => {
const style = document.createElement("style");
document.head.appendChild(style);
2022-08-31 02:07:16 +00:00
VencordNative.ipc.on(IpcEvents.QUICK_CSS_UPDATE, (_, css: string) => style.innerText = css);
style.innerText = await VencordNative.ipc.invoke(IpcEvents.GET_QUICK_CSS);
});