From 87da95b9a47ae9d9debac37678f0632f7aee4f12 Mon Sep 17 00:00:00 2001 From: Cutls Date: Tue, 25 Jun 2019 23:26:15 +0900 Subject: [PATCH] Fix: TheDesk nano --- app/js/platform/end.js | 3 +++ app/js/platform/preload.js | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/js/platform/end.js b/app/js/platform/end.js index afd1fe2e..5c77b067 100644 --- a/app/js/platform/end.js +++ b/app/js/platform/end.js @@ -120,6 +120,9 @@ function playSound() { volumeControl.gain.value = 0.8 source.start(0); } +function nano() { + postMessage(["nano", null], "*") +} onmessage = function (e) { if (e.data[0] == "details") { details(e.data[1][0], e.data[1][1]) diff --git a/app/js/platform/preload.js b/app/js/platform/preload.js index 61f0ae70..50ee329c 100644 --- a/app/js/platform/preload.js +++ b/app/js/platform/preload.js @@ -55,6 +55,8 @@ onmessage = function (e) { ipc.send('theme-css-request', e.data[1]); } else if (e.data[0] == "downloadButton") { ipc.send('download-btn', e.data[1]); + } else if (e.data[0] == "nano") { + ipc.send('nano', null); } } //version.js @@ -76,9 +78,7 @@ ipc.on('shownotf', function (event, args) { postMessage(["udg", [user, acct_id]], "*") } }) -function nano() { - ipc.send('nano', ""); -} + //first.js ipc.on('custom-css-response', function (event, arg) { if (arg == "") { return false; }