armcord/src/settings/preload.ts

10 lines
357 B
TypeScript
Raw Normal View History

2022-02-26 21:26:16 +00:00
import {contextBridge, ipcRenderer} from "electron";
2022-03-04 17:53:18 +00:00
console.log("ArmCord Settings");
2022-02-26 21:26:16 +00:00
contextBridge.exposeInMainWorld("settings", {
2022-03-04 17:53:18 +00:00
save: (...args: any) => ipcRenderer.send("saveSettings", ...args),
get: (toGet: string) =>
ipcRenderer.invoke("getSetting", toGet).then((result) => {
return result;
}) //jank but works
});