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>
|
||||
<script type="text/javascript" src="./js/ui/theme.js"></script>
|
||||
<script>
|
||||
postMessage(["sendSinmpleIpc", "aboutData"], "*")
|
||||
function renderAbout(args) {
|
||||
$("#now").text(localStorage.getItem("ver"));
|
||||
var electron = require("electron");
|
||||
var remote = electron.remote;
|
||||
const shell = electron.shell;
|
||||
$("#node").text(remote.process.version);
|
||||
$("#chrome").text(remote.process.versions.chrome);
|
||||
$("#electron").text(remote.process.versions.electron);
|
||||
$("#node").text(args.version);
|
||||
$("#chrome").text(args.versions.chrome);
|
||||
$("#electron").text(args.versions.electron);
|
||||
}
|
||||
if (location.search) {
|
||||
var m = location.search.match(/\?ver=([a-zA-Z-0-9.]+)/);
|
||||
var ver = m[1];
|
||||
|
@ -118,7 +118,7 @@
|
|||
}
|
||||
$(document).on('click', 'a', e => {
|
||||
var url = $(e.target).attr('href');
|
||||
shell.openExternal(url);
|
||||
postMessage(["openUrl", url], "*")
|
||||
return false;
|
||||
});
|
||||
</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) {
|
||||
if (!str) {
|
||||
return "";
|
||||
|
|
|
@ -243,12 +243,13 @@ ipc.on('prog', function (event, arg) {
|
|||
ipc.on('mess', function (event, arg) {
|
||||
updateMess(arg)
|
||||
})
|
||||
/*
|
||||
//about.html
|
||||
ipc.on('aboutData', function (event, arg) {
|
||||
renderAbout(arg)
|
||||
})
|
||||
var webviewDom = document.getElementById('webview');
|
||||
const {
|
||||
shell
|
||||
} = require('electron');
|
||||
if(webviewDom){
|
||||
webviewDom.addEventListener('new-window', function (e) {
|
||||
shell.openExternal(e.url);
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
|
|
@ -144,9 +144,10 @@ function system(mainWindow, dir, lang) {
|
|||
|
||||
about();
|
||||
});
|
||||
|
||||
ipc.on('aboutData', (e, args) => {
|
||||
e.sender.webContents.send('aboutDataRender', process);
|
||||
});
|
||||
function about() {
|
||||
|
||||
var ver = app.getVersion()
|
||||
var window = new BrowserWindow({
|
||||
webPreferences: {
|
||||
|
|
Loading…
Reference in New Issue
Block a user