summaryrefslogtreecommitdiff
path: root/electron_js/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'electron_js/main.js')
-rw-r--r--electron_js/main.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/electron_js/main.js b/electron_js/main.js
index 2d2f4ec4..efac0235 100644
--- a/electron_js/main.js
+++ b/electron_js/main.js
@@ -2,6 +2,8 @@ const electron = require('electron');
const windowStateKeeper = require('electron-window-state');
const {app, globalShortcut, Menu} = electron;
const {dialog} = require('electron')
+const path = require('path');
+const url = require('url');
// Module to create native browser window.
const {BrowserWindow} = electron;
@@ -98,7 +100,15 @@ const mx = globalShortcut.register('CommandOrControl+Alt+F', () => {
}
// and load the index.html of the app.
- win.loadURL(`file://${__dirname}/index.html`);
+
+ const startUrl = process.env.ELECTRON_START_URL || url.format({
+ pathname: path.join(__dirname, '/../www/index.html'),
+ protocol: 'file:',
+ slashes: true
+ });
+
+ win.loadURL(startUrl);
+ //win.loadURL(`file://${__dirname}/index.html`);
// Create the Application's main menu