2022-08-29 00:25:27 +00:00
|
|
|
import { contextBridge, webFrame } from "electron";
|
|
|
|
import { readFileSync } from "fs";
|
|
|
|
import { join } from "path";
|
2022-08-29 16:11:44 +00:00
|
|
|
import VencordNative from "./VencordNative";
|
2022-08-29 00:25:27 +00:00
|
|
|
|
2022-08-29 16:11:44 +00:00
|
|
|
contextBridge.exposeInMainWorld("VencordNative", VencordNative);
|
2022-08-29 00:25:27 +00:00
|
|
|
|
|
|
|
webFrame.executeJavaScript(readFileSync(join(__dirname, "renderer.js"), "utf-8"));
|
|
|
|
|
|
|
|
require(process.env.DISCORD_PRELOAD!);
|