<commit_before>'use strict';

const electron = require('electron');

// Module to control application life.
const app = electron.app;
const userDataPath = app.getPath('userData');

const storage = require('electron-json-storage');

// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow;

var path = require('path');
var debug = require('debug');

// Server information
var SECC = require('./node_modules/secc/settings.json');
var scheduler = require('./node_modules/secc/lib/scheduler')(SECC);
var serverPort = SECC.scheduler.port;

// for menus
var Tray = require('tray');
var Menu = require('menu');
var iconOnPath = path.join(__dirname, 'icons', 'icon_on.png');
var iconOffPath = path.join(__dirname, 'icons', 'icon_off.png');
var appIcon = null;
var contextMenu = null;

const _START = 0;
const _STOP = 1;

// for ipc
var ipcMain = electron.ipcMain;

// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let mainWindow;

function createWindow () {
  mainWindow = new BrowserWindow({width: 1000, height: 600});
  mainWindow.loadURL('file://' + path.join(__dirname, 'app', 'index.html'));

  // Open the DevTools.
  mainWindow.webContents.openDevTools();

  var handleRedirect = (e, url) => {
    if(url != mainWindow.webContents.getURL()) {
      e.preventDefault();
      require('electron').shell.openExternal(url);
    }
  }

  mainWindow.webContents.on('will-navigate', handleRedirect);
  mainWindow.webContents.on('new-window', handleRedirect);

  // Emitted when the window is closed.
  mainWindow.on('closed', function() {
    mainWindow = null;
  });
}

function createMenuBar() {
  appIcon = new Tray(iconOffPath);
  contextMenu = Menu.buildFromTemplate([
    {<commit_msg>Added app minimum width & height<commit_after>'use strict';

const electron = require('electron');

// Module to control application life.
const app = electron.app;
const userDataPath = app.getPath('userData');

const storage = require('electron-json-storage');

// Module to create native browser window.
const BrowserWindow = electron.BrowserWindow;

var path = require('path');
var debug = require('debug');

// Server information
var SECC = require('./node_modules/secc/settings.json');
var scheduler = require('./node_modules/secc/lib/scheduler')(SECC);
var serverPort = SECC.scheduler.port;

// for menus
var Tray = require('tray');
var Menu = require('menu');
var iconOnPath = path.join(__dirname, 'icons', 'icon_on.png');
var iconOffPath = path.join(__dirname, 'icons', 'icon_off.png');
var appIcon = null;
var contextMenu = null;

const _START = 0;
const _STOP = 1;

// for ipc
var ipcMain = electron.ipcMain;

// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let mainWindow;

function createWindow () {
  mainWindow = new BrowserWindow({width: 1000, height: 600, minWidth:1000, minHeight:600});
  mainWindow.loadURL('file://' + path.join(__dirname, 'app', 'index.html'));

  // Open the DevTools.
  mainWindow.webContents.openDevTools();

  var handleRedirect = (e, url) => {
    if(url != mainWindow.webContents.getURL()) {
      e.preventDefault();
      require('electron').shell.openExternal(url);
    }
  }

  mainWindow.webContents.on('will-navigate', handleRedirect);
  mainWindow.webContents.on('new-window', handleRedirect);

  // Emitted when the window is closed.
  mainWindow.on('closed', function() {
    mainWindow = null;
  });
}

function createMenuBar() {
  appIcon = new Tray(iconOffPath);
  contextMenu = Menu.buildFromTemplate([
    {
{'fraction_non_alphanumeric': 0.1416960173394744, 'fraction_numerical': 0.00677323218639935, 'mean_word_length': 4.494047619047619, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5542062', 'n_tokens_mistral': 1143, 'n_tokens_neox': 1099, 'n_words': 308}