<commit_before>module.exports = function menu(mainWindow) {
  var otherMenu = [{
    label: 'Undo',
    accelerator: 'Control+Z',
    click: function() {
      mainWindow.webContents.undo();
    }
  }, {
    label: 'Copy',
    accelerator: 'Control+C',
    click: function() {
      mainWindow.webContents.copy();
    }

  }, {
    label: 'Paste',
    accelerator: 'Control+V',
    click: function() {
      mainWindow.webContents.paste();
    }
  }];

  return otherMenu;
}
<commit_msg>Added the view modes to the context menu.<commit_after>module.exports = function menu(mainWindow) {
  var otherMenu = [{
    label: 'Undo',
    accelerator: 'Control+Z',
    click: function() {
      mainWindow.webContents.undo();
    }
  }, {
    label: 'Copy',
    accelerator: 'Control+C',
    click: function() {
      mainWindow.webContents.copy();
    }

  }, {
    label: 'Paste',
    accelerator: 'Control+V',
    click: function() {
      mainWindow.webContents.paste();
    }
  },
  {
    type: 'separator'
  },
  {
  label: 'View',
  submenu: [{
    label: 'Editor Mode',
    accelerator: 'Control+Alt+E',
    checked:false,
    type:'radio',

       click: function() {
      mainWindow.webContents.send('editor-mode');
    }
  }, {
    label: 'Preview Mode',
    accelerator: 'Control+Alt+P',
    checked:false,
    type:'radio',
       click: function() {
      mainWindow.webContents.send('preview-mode');
    }
  }, {
    label: 'Split Mode',
    accelerator: 'Control+Alt+S',
    checked:true,
    type:'radio',
    click: function() {
      mainWindow.webContents.send('split-mode');
    }
  }, {
    type: 'separator'
  }, {
    label: 'Reset Marvelous',
    accelerator: 'Control+R',
    click: function() {
      mainWindow.reload();
    }
  }, {
    label: 'Toggle DevTools',
    accelerator: 'Control+Shift+I',
    visible: false,
    click: function() {
      mainWindow.toggleDevTools();
    }
  }]
}, {
  label: 'Window',
  submenu: [{
    label: 'Minimize',
    accelerator: 'Control+M',
    click: function () {
      mainWindow.minimize();
    }
  }, {
    label: 'Close',
    accelerator: 'Control+Q',
    click: function () {
      mainWindow.close();
    }
  }]
}

  ];

  return otherMenu;
}

{'fraction_non_alphanumeric': 0.16817359855334538, 'fraction_numerical': 0.0, 'mean_word_length': 2.5636070853462156, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2099974', 'n_tokens_mistral': 748, 'n_tokens_neox': 746, 'n_words': 135}