diff --git a/app/main/electron-window.js b/app/main/electron-window.js index 05ed28d5..401a8d39 100644 --- a/app/main/electron-window.js +++ b/app/main/electron-window.js @@ -17,7 +17,10 @@ module.exports = function(options={}) { title: options.title || settings.read('appName'), icon: path.resolve(__dirname + '/logo.png'), backgroundColor: options.color || bgColor, - type:options.type + type:options.type, + webPreferences: { + nodeIntegration: !!options.node + } }) window.loadURL(options.address) diff --git a/app/main/main.js b/app/main/main.js index 6d29a8a4..52bfdc4f 100644 --- a/app/main/main.js +++ b/app/main/main.js @@ -68,7 +68,7 @@ if (settings.cli) { launcher app.on('ready',function(){ - launcher = require('./electron-window')({address:address, shortcuts:false, width:680, height:626, color:'#283143'}) + launcher = require('./electron-window')({address:address, shortcuts:false, width:680, height:626, node:true, color:'#283143'}) }) process.stdout.write = (function(write) {