<commit_before>'use strict';

const ipcRenderer = require('electron').ipcRenderer;

ipcRenderer.on('dataReflect', (ev, data) => {
    const testDiv = document.getElementById('test');
    testDiv.innerHTML = data;
});<commit_msg>add: context menu<commit_after>'use strict';

const { ipcRenderer, remote } = require('electron');
const Menu = remote.Menu;
const MenuItem = remote.MenuItem;

ipcRenderer.on('dataReflect', (ev, data) => {
    const testDiv = document.getElementById('test');
    testDiv.innerHTML = data;
});

const iconCog = document.querySelector('.fa-cog');
iconCog.addEventListener('click', () => {
    const menu = new Menu();
    menu.append(new MenuItem({
        label: 'About noah',
        type: 'normal',
        role: 'about'
    }));
    menu.append(new MenuItem({
        label: 'Quit noah',
        type: 'normal',
        accelerator: 'CmdOrCtrl+Q',
        role: 'quit'
    }));
    menu.popup();
});
{'fraction_non_alphanumeric': 0.16792249730893433, 'fraction_numerical': 0.0, 'mean_word_length': 3.5588235294117645, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '4068664', 'n_tokens_mistral': 289, 'n_tokens_neox': 289, 'n_words': 64}