Browse Source

Update index.js to make it work with recent Electron (#119)

- Ensure enough windows size to show the tool bar
- Disable nodeIntegration to allow that jQuery without modification
  https://electronjs.org/docs/faq#i-can-not-use-jqueryrequirejsmeteorangularjs-in-electron
master
Nobuto Murata 6 months ago
parent
commit
4a16b95d25
1 changed files with 8 additions and 1 deletions
  1. 8
    1
      index.js

+ 8
- 1
index.js View File

@@ -10,7 +10,14 @@ const url = require('url')
10 10
 let mainWindow;
11 11
 
12 12
 function createWindow () {
13
-  mainWindow = new BrowserWindow({width: 800, height: 600, icon: path.join(__dirname, 'images', 'favicon.png')});
13
+  mainWindow = new BrowserWindow({
14
+    width: 1024,
15
+    height: 768,
16
+    icon: path.join(__dirname, 'images', 'favicon.png'),
17
+    webPreferences: {
18
+      nodeIntegration: false
19
+    }
20
+  });
14 21
   mainWindow.setMenu(null);
15 22
   mainWindow.loadURL(url.format({
16 23
     pathname: path.join(__dirname, 'index.html'),

Loading…
Cancel
Save