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