-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
executable file
·46 lines (39 loc) · 1.28 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
'use strict';
const app = require('app');
const path = require('path');
const BrowserWindow = require('browser-window');
let mainWindow = null;
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit();
}
});
let ppapiFlashPath = null;
let ppapiFlashVersion = null;
// Specify flash path.
// On Windows, it might be /path/to/pepflashplayer.dll
// On OS X, /path/to/PepperFlashPlayer.plugin
// On Linux, /path/to/libpepflashplayer.so
if (process.platform === 'win32') {
ppapiFlashPath = path.join(__dirname, 'pepper/win32/pepflashplayer.dll');
ppapiFlashVersion = '19.0.0.226';
} else if (process.platform === 'linux') {
ppapiFlashPath = path.join(__dirname, 'pepper/linux/libpepflashplayer.so');
} else if (process.platform === 'darwin') {
ppapiFlashPath = path.join(__dirname, 'pepper/darwin/PepperFlashPlayer.plugin');
ppapiFlashVersion = '19.0.0.226';
}
app.commandLine.appendSwitch('ppapi-flash-path', ppapiFlashPath);
app.commandLine.appendSwitch('ppapi-flash-version', ppapiFlashVersion);
app.on('ready', () => {
mainWindow = new BrowserWindow({
'width': 800,
'height': 600,
'web-preferences': {
'plugins': true,
'node-integration': false
}
});
mainWindow.openDevTools({showDevTools: true});
mainWindow.loadUrl('http://www.deezer.com');
});