Add: sendSinmpleIpc for 'about' #86

This commit is contained in:
Cutls 2019-06-14 23:21:08 +09:00
parent a70444e3c7
commit 7f806bd155
3 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,4 @@
//このソフトについて
function about() {
var electron = require("electron");
var ipc = electron.ipcRenderer;
ipc.send('about', 'go');
postMessage(["sendSinmpleIpc", "about"], "*")
}

View File

@ -3,6 +3,9 @@ var ipc = electron.ipcRenderer;
onmessage = function (e) {
if (e.data[0] == "openUrl") {
shell.openExternal(e.data[1]);
} else if (e.data[0] == "sendSinmpleIpc") {
ipc.send(e.data[1], "")
}
}
ipc.on('reload', function (event, arg) {

View File

@ -99,12 +99,11 @@ function createWindow() {
webviewTag: false,
nodeIntegration: false,
contextIsolation: true,
preload: dir + "/js/platform/preload.js"
preload: join(__dirname,"js", "platform", "preload.js")
},
width: window_size.width, height: window_size.height, x: window_size.x, y: window_size.y, icon: __dirname + '/desk.png'
}
} else if (platform == "win32") {
console.log(join(__dirname,"js", "platform", "preload.js"))
var arg = {
webPreferences: {
webviewTag: false,
@ -120,7 +119,7 @@ function createWindow() {
webviewTag: false,
nodeIntegration: false,
contextIsolation: true,
preload: dir + "/js/platform/preload.js"
preload: join(__dirname,"js", "platform", "preload.js")
},
width: window_size.width, height: window_size.height, x: window_size.x, y: window_size.y, simpleFullscreen: true
}