aboutsummarylogtreecommitdiffstats
path: root/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'index.js')
-rw-r--r--index.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/index.js b/index.js
index fb2b3672d4d7..ba5fa395046c 100644
--- a/index.js
+++ b/index.js
@@ -1,7 +1,14 @@
const { app, BrowserWindow } = require("electron");
+const path = require("path");
app.whenReady().then(() => {
- const mainWindow = new BrowserWindow({autoHideMenuBar: true, backgroundColor: "#161512"});
+ const mainWindow = new BrowserWindow({
+ autoHideMenuBar: true,
+ backgroundColor: "#161512",
+ webPreferences: {
+ preload: path.join(app.getAppPath(), "preload.js"),
+ },
+ });
mainWindow.loadFile("www/index.html");
mainWindow.webContents.session.webRequest.onBeforeSendHeaders(
{urls: ["wss://socket.lichess.org/*"]},