diff --git a/app/js/platform/preload.js b/app/js/platform/preload.js index 9326d86c..1a53a3f5 100644 --- a/app/js/platform/preload.js +++ b/app/js/platform/preload.js @@ -44,9 +44,13 @@ onmessage = function (e) { } else if (e.data[0] == "itunes") { if (ipc.listenerCount('itunes-np') > 0) { return false; - }else{ + } else { 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 @@ -219,7 +223,7 @@ ipc.on('theme-json-response', function (event, args) { }); ipc.on('theme-json-create-complete', function (event, args) { clearCustomImport() - ctLoad() + ctLoad() }); //spotify.js ipc.once('itunes-np', function (event, arg) { @@ -232,6 +236,13 @@ ipc.on('memory', function (event, arg) { var total = arg[2] 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'); const { diff --git a/app/js/ui/theme.js b/app/js/ui/theme.js index 0d550e56..2c8d422c 100644 --- a/app/js/ui/theme.js +++ b/app/js/ui/theme.js @@ -21,7 +21,7 @@ function themes(theme) { } if (theme == "custom") { if (localStorage.getItem("customtheme-id")) { - ipc.send('theme-css-request', localStorage.getItem("customtheme-id")); + postMessage(["themeCSSRequest", localStorage.getItem("customtheme-id")], "*") } } } diff --git a/app/view/en/index.html b/app/view/en/index.html index 9686b34b..90cfb5bd 100644 --- a/app/view/en/index.html +++ b/app/view/en/index.html @@ -214,9 +214,6 @@