Add: sendSinmpleIpc for 'about' #86
This commit is contained in:
parent
a70444e3c7
commit
7f806bd155
|
@ -1,6 +1,4 @@
|
||||||
//このソフトについて
|
//このソフトについて
|
||||||
function about() {
|
function about() {
|
||||||
var electron = require("electron");
|
postMessage(["sendSinmpleIpc", "about"], "*")
|
||||||
var ipc = electron.ipcRenderer;
|
|
||||||
ipc.send('about', 'go');
|
|
||||||
}
|
}
|
|
@ -3,6 +3,9 @@ var ipc = electron.ipcRenderer;
|
||||||
onmessage = function (e) {
|
onmessage = function (e) {
|
||||||
if (e.data[0] == "openUrl") {
|
if (e.data[0] == "openUrl") {
|
||||||
shell.openExternal(e.data[1]);
|
shell.openExternal(e.data[1]);
|
||||||
|
} else if (e.data[0] == "sendSinmpleIpc") {
|
||||||
|
ipc.send(e.data[1], "")
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ipc.on('reload', function (event, arg) {
|
ipc.on('reload', function (event, arg) {
|
||||||
|
|
|
@ -99,12 +99,11 @@ function createWindow() {
|
||||||
webviewTag: false,
|
webviewTag: false,
|
||||||
nodeIntegration: false,
|
nodeIntegration: false,
|
||||||
contextIsolation: true,
|
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'
|
width: window_size.width, height: window_size.height, x: window_size.x, y: window_size.y, icon: __dirname + '/desk.png'
|
||||||
}
|
}
|
||||||
} else if (platform == "win32") {
|
} else if (platform == "win32") {
|
||||||
console.log(join(__dirname,"js", "platform", "preload.js"))
|
|
||||||
var arg = {
|
var arg = {
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
webviewTag: false,
|
webviewTag: false,
|
||||||
|
@ -120,7 +119,7 @@ function createWindow() {
|
||||||
webviewTag: false,
|
webviewTag: false,
|
||||||
nodeIntegration: false,
|
nodeIntegration: false,
|
||||||
contextIsolation: true,
|
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
|
width: window_size.width, height: window_size.height, x: window_size.x, y: window_size.y, simpleFullscreen: true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user