📝 Match variable names

[ci skip]
This commit is contained in:
Plusb Preco 2016-05-11 02:38:42 +09:00
parent 885aeec442
commit 5146befa46
6 changed files with 23 additions and 23 deletions

View file

@ -88,24 +88,24 @@ const {BrowserWindow} = electron;
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let mainWindow;
let win;
function createWindow() {
// Create the browser window.
mainWindow = new BrowserWindow({width: 800, height: 600});
win = new BrowserWindow({width: 800, height: 600});
// and load the index.html of the app.
mainWindow.loadURL(`file://${__dirname}/index.html`);
win.loadURL(`file://${__dirname}/index.html`);
// Open the DevTools.
mainWindow.webContents.openDevTools();
win.webContents.openDevTools();
// Emitted when the window is closed.
mainWindow.on('closed', () => {
win.on('closed', () => {
// Dereference the window object, usually you would store windows
// in an array if your app supports multi windows, this is the time
// when you should delete the corresponding element.
mainWindow = null;
win = null;
});
}
@ -126,7 +126,7 @@ app.on('window-all-closed', () => {
app.on('activate', () => {
// On OS X it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (mainWindow === null) {
if (win === null) {
createWindow();
}
});

View file

@ -29,14 +29,14 @@ app.commandLine.appendSwitch('ppapi-flash-path', '/path/to/libpepflashplayer.so'
app.commandLine.appendSwitch('ppapi-flash-version', '17.0.0.169');
app.on('ready', () => {
mainWindow = new BrowserWindow({
win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
plugins: true
}
});
mainWindow.loadURL(`file://${__dirname}/index.html`);
win.loadURL(`file://${__dirname}/index.html`);
// Something else
});
```

View file

@ -59,9 +59,9 @@ app.commandLine.appendSwitch('widevine-cdm-path', '/path/to/widevinecdmadapter.p
// The version of plugin can be got from `chrome://plugins` page in Chrome.
app.commandLine.appendSwitch('widevine-cdm-version', '1.4.8.866');
let mainWindow = null;
let win = null;
app.on('ready', () => {
mainWindow = new BrowserWindow({
win = new BrowserWindow({
webPreferences: {
// The `plugins` have to be enabled.
plugins: true