'use strict';

const electron = require('electron');
const {app, BrowserWindow} = electron;

let mainWindow;

app.on('ready', () => {
  mainWindow = new BrowserWindow({
    title: 'Hello World',
    width: 266,
    height: 150,
    center: true,
  });

  mainWindow.loadURL('file://' + __dirname + '/index.html');

  mainWindow.on('closed', () => {
    mainWindow = null;
    app.quit();
  });
});

// Restore the window on Mac when the user click on the app icon in the dock
app.on('activate', () => {
  mainWindow.restore();
});

app.on('window-all-closed', () => {
  if (process.platform !== 'darwin')
      app.quit();
});

@@ -12,46 +12,8 @@
 ';%0A%0A
-const electron = require('electron');%0A
 cons
@@ -41,16 +41,25 @@
 %7D = 
+require('
 electron
 ;%0A%0Al
@@ -54,16 +54,18 @@
 electron
+')
 ;%0A%0Alet m

Update electron require to be called directly from 'const {app, BrowserWidow}' line