diff --git a/js/electron.js b/js/electron.js index 6b4c935a..589c265c 100644 --- a/js/electron.js +++ b/js/electron.js @@ -18,13 +18,29 @@ const BrowserWindow = electron.BrowserWindow; let mainWindow; function createWindow() { - // Create the browser window. - if (config.kioskmode) { - mainWindow = new BrowserWindow({width: 800, height: 600, x: 0, y: 0, kiosk:true, darkTheme: true, webPreferences: {nodeIntegration: false, zoomFactor: config.zoom}}); - } else { - mainWindow = new BrowserWindow({width: 800, height: 600, x: 0, y: 0, fullscreen: true, autoHideMenuBar: true, darkTheme: true, webPreferences: {nodeIntegration: false, zoomFactor: config.zoom}}); + + var electronOptions = { + width: 800, + height: 600, + x: 0, + y: 0, + darkTheme: true, + webPreferences: { + nodeIntegration: false, + zoomFactor: config.zoom + } } + if (config.kioskmode) { + electronOptions.kiosk = true; + } else { + electronOptions.fullscreen = true; + electronOptions.autoHideMenuBar = true; + } + + // Create the browser window. + mainWindow = new BrowserWindow(electronOptions); + // and load the index.html of the app. //mainWindow.loadURL('file://' + __dirname + '../../index.html'); mainWindow.loadURL("http://localhost:" + config.port);