Skip to content

Instantly share code, notes, and snippets.

@yancya
Last active November 2, 2017 03:12
Show Gist options
  • Save yancya/9111e390b47f4bec32a5aee190c72164 to your computer and use it in GitHub Desktop.
Save yancya/9111e390b47f4bec32a5aee190c72164 to your computer and use it in GitHub Desktop.
const electron = require('electron');
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
let mainWindow = null;
app.on('window-all-closed', function() {
if (process.platform != 'darwin') {
app.quit();
}
});
app.on('ready', function() {
mainWindow = new BrowserWindow({width: 800, height: 600});
mainWindow.loadURL('https://twitter.com');
mainWindow.on('closed', function() {
mainWindow = null;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment