|
1 | 1 | var backRssApi = require('./api'); |
2 | | -var electron = require('app'); |
3 | | -var BrowserWindow = require('browser-window'); |
4 | | -var shell = require('shell'); |
5 | | -var Menu = require('menu'); |
6 | | -var MenuItem = require('menu-item'); |
| 2 | +var electron = require('electron').app; |
| 3 | +var BrowserWindow = require('electron').BrowserWindow; |
| 4 | +var shell = require('electron').Shell; |
| 5 | +var Menu = require('electron').Menu; |
| 6 | +var MenuItem = require('electron').MenuItem; |
7 | 7 |
|
8 | 8 | backRssApi.start(); |
9 | 9 |
|
@@ -73,7 +73,7 @@ if (process.platform !== 'darwin') { |
73 | 73 | if (!aboutWindow) { |
74 | 74 | aboutWindow = new BrowserWindow({ width: 400, height: 120, "node-integration": false, frame: true, |
75 | 75 | resizable: false, "always-on-top": true }); |
76 | | - aboutWindow.loadUrl('http://localhost:8080/about.html'); |
| 76 | + aboutWindow.loadURL('http://localhost:8080/about.html'); |
77 | 77 |
|
78 | 78 | aboutWindow.on('closed', function () { |
79 | 79 | aboutWindow = null; |
@@ -159,7 +159,7 @@ if (process.platform !== 'darwin') { |
159 | 159 | } |
160 | 160 |
|
161 | 161 | function createMainWindow() { |
162 | | - mainWindow = new BrowserWindow({ width: 1200, height: 768, "node-integration": false, icon: __dirname + '/public/images/icon.png'}); |
| 162 | + mainWindow = new BrowserWindow({ width: 1200, height: 768, webPreferences: { nodeIntegration: false }, icon: __dirname + '/public/images/icon.png'}); |
163 | 163 | mainWindow.loadURL('http://localhost:8080'); |
164 | 164 |
|
165 | 165 | mainWindow.on('closed', function() { |
|
0 commit comments