<commit_before>'use strict'
const electron = require('electron')
<% if (back){ %>
const server = require('./server/main.js')
<% } %>
const app = electron.app

// report crashes to the Electron project
require('crash-reporter').start()

// adds debug features like hotkeys for triggering dev tools and reload
require('electron-debug')()

// add some command line arguments
app.commandLine.appendArgument('--disable-pinch')

// prevent window being garbage collected
let mainWindow

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

function createMainWindow () {
  var winOptions = {width: 1920, height: 1080}
  if (process.env['NODE_ENV'] !== 'dev') {
    winOptions.kiosk = true
    winOptions.frame = false
    winOptions.resizable = false
    winOptions.fullScreen = true
    winOptions.alwaysOnTop = true
  }
  const win = new electron.BrowserWindow(winOptions)

  if (process.env['NODE_ENV'] === 'dev') {
    win.loadURL('http://0.0.0.0:6060/')
    win.openDevTools()
  } else {
    win.loadURL('file://' + __dirname + '/dist/index.html')
  }
  win.on('closed', onClosed)
<commit_msg>adding webPreferences options see https://github.com/electron/electron/blob/master/docs/api/browser-window.md#new-browserwindowoptions for more information<commit_after>'use strict'
const electron = require('electron')
<% if (back){ %>
const server = require('./server/main.js')
<% } %>
const app = electron.app

// report crashes to the Electron project
require('crash-reporter').start()

// adds debug features like hotkeys for triggering dev tools and reload
require('electron-debug')()

// add some command line arguments
app.commandLine.appendArgument('--disable-pinch')

// prevent window being garbage collected
let mainWindow

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

function createMainWindow () {
  var winOptions = {width: 1920, height: 1080}
  if (process.env['NODE_ENV'] !== 'dev') {
    winOptions.kiosk = true
    winOptions.frame = false
    winOptions.resizable = false
    winOptions.fullScreen = true
    winOptions.alwaysOnTop = true
  }
  winOptions.webPreferences = {
    webSecurity: false,
    allowDisplayingInsecureContent: true,
    allowRunningInsecureContent: true,
    plugins: true,
    experimentalFeatures: false,
    experimentalCanvasFeatures: false,
    directWrite: true
  }
  const win = new electron.BrowserWindow(winOptions)

  if (process.env['NODE_ENV'] === 'dev') {
    win.loadURL('http://0.0.0.0:6060/')
    win.openDevTools()
  } else {
    win.loadURL('file://' + __dirname + '/dist/index.html')
  }
  win.on('closed', onClosed)

{'fraction_non_alphanumeric': 0.1323529411764706, 'fraction_numerical': 0.011764705882352941, 'mean_word_length': 3.893884892086331, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '3198322', 'n_tokens_mistral': 852, 'n_tokens_neox': 803, 'n_words': 214}