function getOpacityMenuItems(mainWindow) {
  if (!isWindows && !isMac) {
    return [];
  }

  return [
    {
      label: 'Decrease Opacity',
      accelerator: 'CmdOrCtrl+Shift+Down',
      click() {
        const nextOpacity = getUpdatedOpacity(mainWindow.getOpacity(), -0.1);

        mainWindow.webContents.send('opacity.sync', nextOpacity * 100);
        mainWindow.setOpacity(nextOpacity);
      }
    },
    {
      label: 'Increase Opacity',
      accelerator: 'CmdOrCtrl+Shift+Up',
      click() {
        const nextOpacity = getUpdatedOpacity(mainWindow.getOpacity(), 0.1);

        mainWindow.webContents.send('opacity.sync', nextOpacity * 100);
        mainWindow.setOpacity(nextOpacity);
      }
    },
    {
      label: 'Set Opacity',
      submenu: (() => {
        const result = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10].map((num) => {
          return {
            label: `${ num }0%`,
            accelerator: num === 10 ? `CmdOrCtrl+0` : `CmdOrCtrl+${ num }`,
            click() {
              mainWindow.webContents.send('opacity.sync', num * 10);
              mainWindow.setOpacity(num / 10.0);
            }
          };
        });
        return result;
      })()
    },
    { type: 'separator' },
  ];
}
Conditionally gets the menu items for changing window
opacity if it is supported
@param mainWindow
@return {array}