Change: some node integration on rend-proc #86
This commit is contained in:
parent
070c40a958
commit
eba54d0906
|
@ -104,13 +104,13 @@
|
||||||
class="material-icons left">close</i>Close</button>
|
class="material-icons left">close</i>Close</button>
|
||||||
<script type="text/javascript" src="./js/ui/theme.js"></script>
|
<script type="text/javascript" src="./js/ui/theme.js"></script>
|
||||||
<script>
|
<script>
|
||||||
$("#now").text(localStorage.getItem("ver"));
|
postMessage(["sendSinmpleIpc", "aboutData"], "*")
|
||||||
var electron = require("electron");
|
function renderAbout(args) {
|
||||||
var remote = electron.remote;
|
$("#now").text(localStorage.getItem("ver"));
|
||||||
const shell = electron.shell;
|
$("#node").text(args.version);
|
||||||
$("#node").text(remote.process.version);
|
$("#chrome").text(args.versions.chrome);
|
||||||
$("#chrome").text(remote.process.versions.chrome);
|
$("#electron").text(args.versions.electron);
|
||||||
$("#electron").text(remote.process.versions.electron);
|
}
|
||||||
if (location.search) {
|
if (location.search) {
|
||||||
var m = location.search.match(/\?ver=([a-zA-Z-0-9.]+)/);
|
var m = location.search.match(/\?ver=([a-zA-Z-0-9.]+)/);
|
||||||
var ver = m[1];
|
var ver = m[1];
|
||||||
|
@ -118,7 +118,7 @@
|
||||||
}
|
}
|
||||||
$(document).on('click', 'a', e => {
|
$(document).on('click', 'a', e => {
|
||||||
var url = $(e.target).attr('href');
|
var url = $(e.target).attr('href');
|
||||||
shell.openExternal(url);
|
postMessage(["openUrl", url], "*")
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
|
@ -1,6 +1,3 @@
|
||||||
//jQuery読む
|
|
||||||
window.jQuery = window.$ = require('../../js/common/jquery.js');
|
|
||||||
var Hammer = require('../../js/common/hammer.min.js');
|
|
||||||
$.strip_tags = function (str, allowed) {
|
$.strip_tags = function (str, allowed) {
|
||||||
if (!str) {
|
if (!str) {
|
||||||
return "";
|
return "";
|
||||||
|
|
|
@ -243,12 +243,13 @@ ipc.on('prog', function (event, arg) {
|
||||||
ipc.on('mess', function (event, arg) {
|
ipc.on('mess', function (event, arg) {
|
||||||
updateMess(arg)
|
updateMess(arg)
|
||||||
})
|
})
|
||||||
/*
|
//about.html
|
||||||
|
ipc.on('aboutData', function (event, arg) {
|
||||||
|
renderAbout(arg)
|
||||||
|
})
|
||||||
var webviewDom = document.getElementById('webview');
|
var webviewDom = document.getElementById('webview');
|
||||||
const {
|
if(webviewDom){
|
||||||
shell
|
webviewDom.addEventListener('new-window', function (e) {
|
||||||
} = require('electron');
|
shell.openExternal(e.url);
|
||||||
webviewDom.addEventListener('new-window', function (e) {
|
});
|
||||||
shell.openExternal(e.url);
|
}
|
||||||
});
|
|
||||||
*/
|
|
||||||
|
|
|
@ -144,9 +144,10 @@ function system(mainWindow, dir, lang) {
|
||||||
|
|
||||||
about();
|
about();
|
||||||
});
|
});
|
||||||
|
ipc.on('aboutData', (e, args) => {
|
||||||
|
e.sender.webContents.send('aboutDataRender', process);
|
||||||
|
});
|
||||||
function about() {
|
function about() {
|
||||||
|
|
||||||
var ver = app.getVersion()
|
var ver = app.getVersion()
|
||||||
var window = new BrowserWindow({
|
var window = new BrowserWindow({
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user