aboutsummaryrefslogtreecommitdiff
path: root/src/preload.ts
blob: 0fc7430a50a57b1d2b214410bec29bc55bc0a728 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { contextBridge, webFrame } from "electron";
import { readFileSync } from "fs";
import { join } from "path";
import Vencord from "./Vencord";

contextBridge.exposeInMainWorld("VencordNative", {
    getSettings: () => "hi"
});

webFrame.executeJavaScript(readFileSync(join(__dirname, "renderer.js"), "utf-8"));

require(process.env.DISCORD_PRELOAD!);

window.onload = () => console.log("hi");