BetterDiscordApp-v2/tests/index.js

21 lines
586 B
JavaScript
Raw Normal View History

2018-01-10 17:02:29 +01:00
const { app, BrowserWindow } = require('electron');
2018-01-10 21:52:49 +01:00
const { BetterDiscord } = require('../core/dist/main.js');
2018-01-10 17:02:29 +01:00
const path = require('path');
const url = require('url');
const config = require('./config.json');
let bw;
2018-01-10 23:15:31 +01:00
const bd = new BetterDiscord(Object.assign(config));
2018-01-10 17:02:29 +01:00
app.on('ready', () => {
2018-01-10 23:15:31 +01:00
2018-01-10 17:02:29 +01:00
bw = new BrowserWindow({ width: 1920, height: 1080 });
bw.webContents.openDevTools();
bw.loadURL(url.format({
pathname: path.join(__dirname, 'frontend', 'index.html'),
protocol: 'file',
slashes: true
}));
bw.on('closed', () => app.quit());
2018-01-10 23:15:31 +01:00
2018-01-10 17:02:29 +01:00
});