1
Fork 0

Moved main URL to constant

This commit is contained in:
Jake Howard 2015-11-04 19:42:46 +00:00
parent 3fb6fc5c1e
commit 49079e4d7d

View file

@ -14,6 +14,7 @@ Menu.setApplicationMenu(menu);
var mainWindow = null; var mainWindow = null;
var audioController = null; var audioController = null;
var icon = null; var icon = null;
const INDEX_PAGE = 'file://' + __dirname + '/index.html';
// Make sure the application closes // Make sure the application closes
app.on('window-all-closed', function () { app.on('window-all-closed', function () {
@ -33,7 +34,7 @@ app.on('ready', function () {
height: 600, height: 600,
frame: false frame: false
}); });
mainWindow.loadUrl('file://' + __dirname + '/index.html'); mainWindow.loadUrl(INDEX_PAGE);
mainWindow.toggleDevTools(); mainWindow.toggleDevTools();
mainWindow.on('closed', function() { mainWindow.on('closed', function() {
delete mainWindow; delete mainWindow;
@ -56,8 +57,8 @@ ipc.on('hide', function () {
}); });
ipc.on('show', function () { ipc.on('show', function () {
mainWindow.loadUrl('file://' + __dirname + '/index.html');
mainWindow.show(); mainWindow.show();
mainWindow.loadUrl(INDEX_PAGE);
}); });
ipc.on('close', function () { ipc.on('close', function () {