armcord/utils/bridge.js

14 lines
431 B
JavaScript
Raw Normal View History

2021-11-01 10:47:32 +00:00
const { contextBridge, remote, desktopCapturer } = require("electron");
const currentWindow = remote.getCurrentWindow();
contextBridge.exposeInMainWorld("electron", {
window: {
show: () => currentWindow.show(),
hide: () => currentWindow.hide(),
minimize: () => currentWindow.minimize(),
maximize: () => currentWindow.maximize(),
},
version: process.versions.electron,
desktopCapturer: desktopCapturer,
});