summaryrefslogtreecommitdiff
path: root/electron_js/main.js
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2018-09-07 09:05:30 -0400
committerPliable Pixels <pliablepixels@gmail.com>2018-09-07 09:05:30 -0400
commit12f2c4010261d7615d7290b62540c793354f8e34 (patch)
tree805e8889f1fe86a386333217b5d366fb15d3727f /electron_js/main.js
parent17ce2311225b7d6794b0a65ce9bf87b68958f5df (diff)
#701 initial code
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