<commit_before>'use strict';
const electron = require('electron');
const app = electron.app;

require('electron-reload')(__dirname);

// prevent window being garbage collected
let mainWindow;

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

function createMainWindow() {
	const win = new electron.BrowserWindow({
		width: 600,
		height: 400
	});

	win.loadURL(`file://${__dirname}/app/index.html`);
	win.on('closed', onClosed);
	// win.setMenu(null);

	return win;
}

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

app.on('activate', () => {
	if (!mainWindow) {
		mainWindow = createMainWindow();
	}
});

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

// TODO: use Photon
// TODO: find about possibility of cross-platform shell integration

// TODO: undo history stored in settings?<commit_msg>TODO tweak<commit_after>'use strict';
const electron = require('electron');
const app = electron.app;

require('electron-reload')(__dirname);

// prevent window being garbage collected
let mainWindow;

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

function createMainWindow() {
	const win = new electron.BrowserWindow({
		width: 600,
		height: 400
	});

	win.loadURL(`file://${__dirname}/app/index.html`);
	win.on('closed', onClosed);
	// win.setMenu(null);

	return win;
}

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

app.on('activate', () => {
	if (!mainWindow) {
		mainWindow = createMainWindow();
	}
});

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

// TODO: use Photon or Quasar or CSS Grid Layout (at a pinch)
// TODO: find about possibility of cross-platform shell integration

// TODO: undo history stored in settings?
{'fraction_non_alphanumeric': 0.16728037874802734, 'fraction_numerical': 0.00631246712256707, 'mean_word_length': 4.210958904109589, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '2151510', 'n_tokens_mistral': 636, 'n_tokens_neox': 601, 'n_words': 163}