Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const { app, BrowserWindow } = require('electron')
- const path = require('path')
- const url = require('url')
- let win
- function createWindow() {
- win = new BrowserWindow({ frame: false, backgroundColor: '#333333' })
- win.setMenu(null)
- win.maximize()
- win.setMaximizable(false)
- win.setResizable(false)
- win.loadURL(url.format({
- pathname: path.join(__dirname, 'index.html'),
- protocol: 'file:',
- slashes: true
- }))
- win.on('closed', () => {
- win = null
- })
- }
- app.on('ready', createWindow)
- app.on('window-all-closed', () => {
- app.quit()
- })
- app.on('active', () => {
- if (win === null) {
- createWindow()
- }
- })
Add Comment
Please, Sign In to add comment