Skip to content

Instantly share code, notes, and snippets.

@mjtiempo
Last active April 9, 2020 13:06
Show Gist options
  • Save mjtiempo/cb696fc6b1802e37173b47349d0232e7 to your computer and use it in GitHub Desktop.
Save mjtiempo/cb696fc6b1802e37173b47349d0232e7 to your computer and use it in GitHub Desktop.
const {app, BrowserWindow} = require('electron') // http://electron.atom.io/docs/api
let window = null
// Wait until the app is ready
app.once('ready', () => {
// Create a new window
window = new BrowserWindow({
// Set the initial width to 800px
width: 800,
// Set the initial height to 600px
height: 600,
// Don't show the window until it ready, this prevents any white flickering
show: false,
webPreferences: {
// Disable node integration in remote page
nodeIntegration: false
}
})
// URL is argument to npm start
const url = "https://core1-den.brightlinkip.com/webphone/login"
window.loadURL(url)
// Show window when page is ready
window.once('ready-to-show', () => {
window.maximize()
window.show()
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment