Remove: node on update.html #86

This commit is contained in:
Cutls 2019-06-15 02:23:41 +09:00
parent 8d308cae5e
commit 070c40a958
9 changed files with 42 additions and 52 deletions

View File

@ -47,6 +47,10 @@ onmessage = function (e) {
} else { } else {
ipc.send("itunes", e.data[1]) ipc.send("itunes", e.data[1])
} }
} else if (e.data[0] == "themeCSSRequest") {
ipc.send('theme-css-request', e.data[1]);
} else if (e.data[0] == "downloadButton") {
ipc.send('download-btn', e.data[1]);
} }
} }
//version.js //version.js
@ -232,6 +236,13 @@ ipc.on('memory', function (event, arg) {
var total = arg[2] var total = arg[2]
renderMem(use, cpu, total) renderMem(use, cpu, total)
}) })
//update.html
ipc.on('prog', function (event, arg) {
updateProg(arg)
})
ipc.on('mess', function (event, arg) {
updateMess(arg)
})
/* /*
var webviewDom = document.getElementById('webview'); var webviewDom = document.getElementById('webview');
const { const {

View File

@ -21,7 +21,7 @@ function themes(theme) {
} }
if (theme == "custom") { if (theme == "custom") {
if (localStorage.getItem("customtheme-id")) { if (localStorage.getItem("customtheme-id")) {
ipc.send('theme-css-request', localStorage.getItem("customtheme-id")); postMessage(["themeCSSRequest", localStorage.getItem("customtheme-id")], "*")
} }
} }
} }

View File

@ -214,9 +214,6 @@
</ul> </ul>
<!-- その他 Dropdown Structure --> <!-- その他 Dropdown Structure -->
<ul id="dropdown2" class="dropdown-content"> <ul id="dropdown2" class="dropdown-content">
<li>
<a onclick="adobe()">Adobe Photo Editor</a>
</li>
<li> <li>
<a onclick="nowplaying('spotify');">NowPlaying(Spotify)</a> <a onclick="nowplaying('spotify');">NowPlaying(Spotify)</a>
</li> </li>

View File

@ -135,9 +135,6 @@
$("#skipper").toggleClass("show"); $("#skipper").toggleClass("show");
} }
} }
var electron = require("electron");
var ipc = electron.ipcRenderer;
//var shell = electron.shell;
verck(); verck();
function update(sel) { function update(sel) {
$("#box").toggleClass("show"); $("#box").toggleClass("show");
@ -186,22 +183,22 @@
shell.openExternal(url); shell.openExternal(url);
return false; return false;
} }
ipc.send('download-btn', [url, file]); postMessage(["downloadButton", [url, file]], "*")
}); });
} }
function quit() { function quit() {
ipc.send('quit', 'go'); postMessage(["sendSinmpleIpc", "quit"], "*")
} }
ipc.on('prog', function (event, arg) { function updateProg(arg) {
console.log(arg); console.log(arg);
$(".determinate").css("width", arg * 100 + "%"); $(".determinate").css("width", arg * 100 + "%");
$("#prog").text(Math.floor(arg * 100) + "%"); $("#prog").text(Math.floor(arg * 100) + "%");
}) }
ipc.on('mess', function (event, arg) { function updateMess(arg) {
console.log(arg); console.log(arg);
$("#prog").text(arg); $("#prog").text(arg);
}) }
function verck() { function verck() {
var remote = electron.remote; var remote = electron.remote;
var platform = remote.process.platform; var platform = remote.process.platform;

View File

@ -214,9 +214,6 @@
</ul> </ul>
<!-- その他 Dropdown Structure --> <!-- その他 Dropdown Structure -->
<ul id="dropdown2" class="dropdown-content"> <ul id="dropdown2" class="dropdown-content">
<li>
<a onclick="adobe()">Adobeフォトエディタ</a>
</li>
<li> <li>
<a onclick="nowplaying('spotify');">NowPlaying(Spotify)</a> <a onclick="nowplaying('spotify');">NowPlaying(Spotify)</a>
</li> </li>

View File

@ -135,9 +135,6 @@
$("#skipper").toggleClass("show"); $("#skipper").toggleClass("show");
} }
} }
var electron = require("electron");
var ipc = electron.ipcRenderer;
//var shell = electron.shell;
verck(); verck();
function update(sel) { function update(sel) {
$("#box").toggleClass("show"); $("#box").toggleClass("show");
@ -186,22 +183,22 @@
shell.openExternal(url); shell.openExternal(url);
return false; return false;
} }
ipc.send('download-btn', [url, file]); postMessage(["downloadButton", [url, file]], "*")
}); });
} }
function quit() { function quit() {
ipc.send('quit', 'go'); postMessage(["sendSinmpleIpc", "quit"], "*")
} }
ipc.on('prog', function (event, arg) { function updateProg(arg) {
console.log(arg); console.log(arg);
$(".determinate").css("width", arg * 100 + "%"); $(".determinate").css("width", arg * 100 + "%");
$("#prog").text(Math.floor(arg * 100) + "%"); $("#prog").text(Math.floor(arg * 100) + "%");
}) }
ipc.on('mess', function (event, arg) { function updateMess(arg) {
console.log(arg); console.log(arg);
$("#prog").text(arg); $("#prog").text(arg);
}) }
function verck() { function verck() {
var remote = electron.remote; var remote = electron.remote;
var platform = remote.process.platform; var platform = remote.process.platform;

View File

@ -135,9 +135,6 @@
$("#skipper").toggleClass("show"); $("#skipper").toggleClass("show");
} }
} }
var electron = require("electron");
var ipc = electron.ipcRenderer;
//var shell = electron.shell;
verck(); verck();
function update(sel) { function update(sel) {
$("#box").toggleClass("show"); $("#box").toggleClass("show");
@ -186,22 +183,22 @@
shell.openExternal(url); shell.openExternal(url);
return false; return false;
} }
ipc.send('download-btn', [url, file]); postMessage(["downloadButton", [url, file]], "*")
}); });
} }
function quit() { function quit() {
ipc.send('quit', 'go'); postMessage(["sendSinmpleIpc", "quit"], "*")
} }
ipc.on('prog', function (event, arg) { function updateProg(arg) {
console.log(arg); console.log(arg);
$(".determinate").css("width", arg * 100 + "%"); $(".determinate").css("width", arg * 100 + "%");
$("#prog").text(Math.floor(arg * 100) + "%"); $("#prog").text(Math.floor(arg * 100) + "%");
}) }
ipc.on('mess', function (event, arg) { function updateMess(arg) {
console.log(arg); console.log(arg);
$("#prog").text(arg); $("#prog").text(arg);
}) }
function verck() { function verck() {
var remote = electron.remote; var remote = electron.remote;
var platform = remote.process.platform; var platform = remote.process.platform;

View File

@ -214,9 +214,6 @@
</ul> </ul>
<!-- その他 Dropdown Structure --> <!-- その他 Dropdown Structure -->
<ul id="dropdown2" class="dropdown-content"> <ul id="dropdown2" class="dropdown-content">
<li>
<a onclick="adobe()">crwdns392:0crwdne392:0</a>
</li>
<li> <li>
<a onclick="nowplaying('spotify');">crwdns1880:0crwdne1880:0</a> <a onclick="nowplaying('spotify');">crwdns1880:0crwdne1880:0</a>
</li> </li>

View File

@ -135,9 +135,6 @@
$("#skipper").toggleClass("show"); $("#skipper").toggleClass("show");
} }
} }
var electron = require("electron");
var ipc = electron.ipcRenderer;
//var shell = electron.shell;
verck(); verck();
function update(sel) { function update(sel) {
$("#box").toggleClass("show"); $("#box").toggleClass("show");
@ -186,22 +183,22 @@
shell.openExternal(url); shell.openExternal(url);
return false; return false;
} }
ipc.send('download-btn', [url, file]); postMessage(["downloadButton", [url, file]], "*")
}); });
} }
function quit() { function quit() {
ipc.send('quit', 'go'); postMessage(["sendSinmpleIpc", "quit"], "*")
} }
ipc.on('prog', function (event, arg) { function updateProg(arg) {
console.log(arg); console.log(arg);
$(".determinate").css("width", arg * 100 + "%"); $(".determinate").css("width", arg * 100 + "%");
$("#prog").text(Math.floor(arg * 100) + "%"); $("#prog").text(Math.floor(arg * 100) + "%");
}) }
ipc.on('mess', function (event, arg) { function updateMess(arg) {
console.log(arg); console.log(arg);
$("#prog").text(arg); $("#prog").text(arg);
}) }
function verck() { function verck() {
var remote = electron.remote; var remote = electron.remote;
var platform = remote.process.platform; var platform = remote.process.platform;