'use strict';
const app = require('app');
const BrowserWindow = require('browser-window');

// report crashes to the Electron project
// require('crash-reporter').start();

// adds debug features like hotkeys for triggering dev tools and reload
require('electron-debug')();

// prevent window being GC'd
let mainWindow;

function createMainWindow() {
  const win = new BrowserWindow({
    width: 600,
    height: 400,
    resizable: true,
    transparent: true,
    frame: true,
    // 'title-bar-style': 'hidden',
    'always-on-top': true
  });
  // win.maximize();

  win.loadUrl(`file://${__dirname}/renderer/index.html`);
  win.on('closed', onClosed);

  return win;
}

function onClosed() {
  // deref the window
  // for multiple windows store them in an array
  mainWindow = null;
}

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

app.on('activate-with-no-open-windows', function () {
  if (!mainWindow) {
    mainWindow = createMainWindow();
  }
});

app.on('ready', function () {
  mainWindow = createMainWindow();
});

@@ -83,16 +83,46 @@
 indow');
+%0Aconst Menu = require('menu');
 %0A%0A// rep
@@ -815,16 +815,349 @@
 ull;%0A%7D%0A%0A
+function createMenu() %7B%0A  var template = %5B%0A    %7B%0A      label: require('app').getName(),%0A      submenu: %5B%0A        %7B%0A          label: 'Quit',%0A          accelerator: 'Command+Q',%0A          click: function() %7B app.quit(); %7D%0A        %7D%0A      %5D%0A    %7D%0A  %5D;%0A%0A  var menu = Menu.buildFromTemplate(template);%0A  Menu.setApplicationMenu(menu);%0A%7D%0A%0A
 app.on('
@@ -1440,12 +1440,28 @@
 ndow();%0A
+  createMenu();%0A
 %7D);%0A

Add app menu to quit app