From 7b2c543d59e3a68e793d1560fe8d173aa524fb98 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Fri, 9 Feb 2018 00:05:50 +0100 Subject: [PATCH] gui: disable node in default client --- app/main/electron-window.js | 5 ++++- app/main/main.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) 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) {