diff options
author | Vendicated <vendicated@riseup.net> | 2022-08-29 18:11:44 +0200 |
---|---|---|
committer | Vendicated <vendicated@riseup.net> | 2022-08-29 18:11:44 +0200 |
commit | 876e622f4f61a4aa229ad69782d374335c3d8d6b (patch) | |
tree | 9119371f584f59b4512553d6548bd11fc84b7dcf /src/utils | |
parent | af498e78291b67377aaf876c84143cdfe7c8b308 (diff) | |
download | Vencord-876e622f4f61a4aa229ad69782d374335c3d8d6b.tar.gz Vencord-876e622f4f61a4aa229ad69782d374335c3d8d6b.tar.bz2 Vencord-876e622f4f61a4aa229ad69782d374335c3d8d6b.zip |
Progress
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/constants.ts | 3 | ||||
-rw-r--r-- | src/utils/ipcEvents.ts | 3 | ||||
-rw-r--r-- | src/utils/quickCss.ts | 6 |
3 files changed, 9 insertions, 3 deletions
diff --git a/src/utils/constants.ts b/src/utils/constants.ts index ef008cd..e948309 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -1,4 +1 @@ -import { join } from 'path'; - export const WEBPACK_CHUNK = "webpackChunkdiscord_app"; -// export const SETTINGS_DIR = join(process.env.DATA_DIR!, "settings"); diff --git a/src/utils/ipcEvents.ts b/src/utils/ipcEvents.ts new file mode 100644 index 0000000..1920023 --- /dev/null +++ b/src/utils/ipcEvents.ts @@ -0,0 +1,3 @@ +export const IPC_QUICK_CSS_UPDATE = "VencordQuickCssUpdate"; +export const IPC_GET_QUICK_CSS = "VencordGetQuickCss"; +export const IPC_GET_SETTINGS_DIR = "VencordGetSettingsDir";
\ No newline at end of file diff --git a/src/utils/quickCss.ts b/src/utils/quickCss.ts new file mode 100644 index 0000000..573eccc --- /dev/null +++ b/src/utils/quickCss.ts @@ -0,0 +1,6 @@ +document.addEventListener("DOMContentLoaded", async () => { + const style = document.createElement("style"); + document.head.appendChild(style); + VencordNative.handleQuickCssUpdate((css: string) => style.innerText = css); + style.innerText = await VencordNative.getQuickCss(); +});
\ No newline at end of file |