-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
38 lines (35 loc) · 863 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
'use strict';
const electron = require('electron');
const app = electron.app;
const BrowserWindow = electron.BrowserWindow;
let mainWindow;
app.on('window-all-closed', function() {
if(process.platform != 'darwin') {
app.quit();
}
});
app.on('ready', function() {
mainWindow = new BrowserWindow({
width: 80*8,
height: 24*15,
userContentSize: true,
title: "Text Transmitter",
autoHideMenuBar: true,
darkTheme: true,
webPreferences: {
defaultEncoding: "UTF-8",
textAreasAreResizable: false,
defaultFontFamily: {
standard: "Noto Sans",
serif: "Georgia",
sansSerif: "Noto Sans"
}
}
});
mainWindow.loadURL('file://'+__dirname+'/index.html');
// this line below opens dev tools. Feel free to comment it or not.
mainWindow.webContents.openDevTools();
mainWindow.on('closed', function() {
mainWindow = null;
});
});