armcord/utils/bridge.js
smartfridge 64c6c1f118 2.6.0
2021-11-01 11:47:32 +01:00

13 lines
431 B
JavaScript

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,
});