From 44642b1c39125a71f1e9b3f487ec6d0665853a61 Mon Sep 17 00:00:00 2001 From: MengYX Date: Wed, 23 Sep 2020 12:54:54 +0800 Subject: [PATCH] Fix kgm bug --- src/App.vue | 2 +- src/component/upload.vue | 12 ++++++------ src/decrypt/kgm.js | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/App.vue b/src/App.vue index 2295a70..3d1674e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -100,7 +100,7 @@ } catch (e) { } if ((!!updateInfo && process.env.NODE_ENV === 'production') && (!!updateInfo.HttpsFound || - (!!updateInfo.Found && document.location.protocol !== "https:"))) { + (!!updateInfo.Found && window.location.protocol !== "https:"))) { this.$notify.warning({ title: '发现更新', message: '发现新版本 v' + updateInfo.Version + diff --git a/src/component/upload.vue b/src/component/upload.vue index ff21952..0636167 100644 --- a/src/component/upload.vue +++ b/src/component/upload.vue @@ -47,12 +47,12 @@ this.idle_workers.push(0); // delay to optimize for first loading setTimeout(() => { - for (let i = 1; i < this.thread_num; i++) { - // noinspection JSValidateTypes,JSUnresolvedVariable - this.workers.push(worker().CommonDecrypt); - this.idle_workers.push(i); - } - }, 1000); + for (let i = 1; i < this.thread_num; i++) { + // noinspection JSValidateTypes,JSUnresolvedVariable + this.workers.push(worker().CommonDecrypt); + this.idle_workers.push(i); + } + }, 5000); } else { const dec = require('../decrypt/common'); this.workers.push(dec.CommonDecrypt); diff --git a/src/decrypt/kgm.js b/src/decrypt/kgm.js index 62d915f..317582e 100644 --- a/src/decrypt/kgm.js +++ b/src/decrypt/kgm.js @@ -12,7 +12,7 @@ const VprMaskDiff = [0x25, 0xDF, 0xE8, 0xA6, 0x75, 0x1E, 0x75, 0x0E, 0x00] export async function Decrypt(file, raw_filename, raw_ext) { - if (document.location.protocol === "file:") { + if (window.location.protocol === "file:") { return { status: false, message: "请使用CLI版本进行解锁"