<commit_before>module.exports.getTemplate = (currentMode) => {
  function isChecked(mode) { return currentMode == mode }
  function onClick(mode) { return () => { ipcRenderer.send('setNotificationMode', mode); } }

  return [
    {
      label: 'idobata-electron',
      submenu: [
        {
          role: 'about' // only macOS
        },
        {
          type: 'separator'
        },
        {
          label: 'Notification',
          submenu: [
            {
              label: 'All messages',
              type: 'radio',
              checked: isChecked('all'),
              click: onClick('all')
            },
            {
              label: 'Mentions',
              type: 'radio',
              checked: isChecked('mention'),
              click: onClick('mention')
            },
            {
              label: 'Never',
              type: 'radio',
              checked: isChecked('never'),
              click: onClick('never')
            }
          ]
        },
        {
          type: 'separator'
        },
        {
          role: 'services', // only macOS
          submenu: []
        },
        {
          type: 'separator'
        },
        {
          role: 'hide' // only macOS
        },
        {
          role: 'hideothers' // only macOS
        },
        {
          role: 'unhide' // only macOS
        },
        {
          type: 'separator'
        },
        {
          role: 'quit'
        },
      ]
    },
    {
      label: 'Edit',
      submenu: [
        {
          role: 'undo'
        },
        {
          role: 'redo'
        },
        {
          type: 'separator'
        },
        {
          role: 'cut'
        },
        {
          role: 'copy'
        },
        {
          role: 'paste'
        },
        {
          role: 'pasteandmatchstyle'
        },
        {
          role: 'delete'
        },
        {
          role: 'selectall'
        }
      ]
    },
    {
      label: 'View',
      submenu: [
        {
          label: 'Reload',
          accelerator: 'Command+R',
          click() { remote.getCurrentWindow().reload(); }
        },
        {
          label: 'Toggle DevTools',
          accelerator: 'Alt+Command+I',
          click() { remote.getCurrentWindow().toggleDevTools(); }
        },
        {
          type: 'separator'
        },
        {
          role: 'togglefullscreen'
        }
      ]
    },
    {
      role: 'window', // only macOS
      submenu: [
        {
          role: 'minimize'
        },
        {
          role: 'zoom' // only macOS
        },
        {
          role: 'close'
        },
        {
          type: 'separator'
        },
        {
          role: 'front' // only macOS
        }
      ]
    },
    {
      role: 'help', // only macOS
      submenu: [
        {
          label: 'Learn More',
          click() {
            require('electron').shell.openExternal('https://github.com/hrysd/idobata-electron');<commit_msg>Add menu items for zoom<commit_after>module.exports.getTemplate = (currentMode) => {
  function isChecked(mode) { return currentMode == mode }
  function onClick(mode) { return () => { ipcRenderer.send('setNotificationMode', mode); } }

  return [
    {
      label: 'idobata-electron',
      submenu: [
        {
          role: 'about' // only macOS
        },
        {
          type: 'separator'
        },
        {
          label: 'Notification',
          submenu: [
            {
              label: 'All messages',
              type: 'radio',
              checked: isChecked('all'),
              click: onClick('all')
            },
            {
              label: 'Mentions',
              type: 'radio',
              checked: isChecked('mention'),
              click: onClick('mention')
            },
            {
              label: 'Never',
              type: 'radio',
              checked: isChecked('never'),
              click: onClick('never')
            }
          ]
        },
        {
          type: 'separator'
        },
        {
          role: 'services', // only macOS
          submenu: []
        },
        {
          type: 'separator'
        },
        {
          role: 'hide' // only macOS
        },
        {
          role: 'hideothers' // only macOS
        },
        {
          role: 'unhide' // only macOS
        },
        {
          type: 'separator'
        },
        {
          role: 'quit'
        },
      ]
    },
    {
      label: 'Edit',
      submenu: [
        {
          role: 'undo'
        },
        {
          role: 'redo'
        },
        {
          type: 'separator'
        },
        {
          role: 'cut'
        },
        {
          role: 'copy'
        },
        {
          role: 'paste'
        },
        {
          role: 'pasteandmatchstyle'
        },
        {
          role: 'delete'
        },
        {
          role: 'selectall'
        }
      ]
    },
    {
      label: 'View',
      submenu: [
        {
          label: 'Reload',
          accelerator: 'Command+R',
          click() { remote.getCurrentWindow().reload(); }
        },
        {
          label: 'Toggle DevTools',
          accelerator: 'Alt+Command+I',
          click() { remote.getCurrentWindow().toggleDevTools(); }
        },
        {
          type: 'separator'
        },
        {
          role: 'togglefullscreen'
        },
        {
          type: 'separator'
        },
        {
          role: 'resetzoom'
        },
        {
          role: 'zoomin'
        },
        {
          role: 'zoomout'
        }
      ]
    },
    {
      role: 'window', // only macOS
      submenu: [
        {
          role: 'minimize'
        },
        {
          role: 'zoom' // only macOS
        },
        {
          role: 'close'
        },
        {
          type: 'separator'
        },
        {
          role: 'front' // only macOS
        }
      ]
    },
    {
      role: 'help', // only macOS
      submenu: [
        {
          label: 'Learn More',
          click() {
            require('electron').shell.openExternal('https://github.com/hrysd/idobata-electron');
{'fraction_non_alphanumeric': 0.13604556550040683, 'fraction_numerical': 0.0, 'mean_word_length': 0.9394130640580625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '867549', 'n_tokens_mistral': 1743, 'n_tokens_neox': 1715, 'n_words': 301}