OpenModLauncher-Base/preload.js

19 lines
508 B
JavaScript

const electron = require("electron");
electron.contextBridge.exposeInMainWorld("minimizeWindow", function () {
return electron.ipcRenderer.invoke("minimize");
});
electron.contextBridge.exposeInMainWorld("closeWindow", function () {
return electron.ipcRenderer.invoke("close");
});
electron.contextBridge.exposeInMainWorld("game", {
"isInstalled": function () {
return electron.ipcRenderer.invoke("is-installed");
},
"install": function () {
return electron.ipcRenderer.invoke("install");
}
});