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
This commit is contained in:
Nobuto Murata 2019-02-12 04:02:08 +09:00 committed by Qix
parent b1df7122eb
commit 4a16b95d25
1 changed files with 8 additions and 1 deletions

View File

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