From 51e36574e8faca99c75a2d47cfa902804163a158 Mon Sep 17 00:00:00 2001 From: msojocs Date: Tue, 28 Jun 2022 19:17:53 +0800 Subject: [PATCH] bilibili: update to v1.2.3.809 --- conf/bilibili_version | 2 +- res/scripts/injectIndex.js | 29 +++++++++++++++++++---------- tools/fix-other.sh | 12 ++++++------ 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/conf/bilibili_version b/conf/bilibili_version index 15f64a9..83edaff 100644 --- a/conf/bilibili_version +++ b/conf/bilibili_version @@ -1 +1 @@ -1.2.2.796 \ No newline at end of file +1.2.3.809 \ No newline at end of file diff --git a/res/scripts/injectIndex.js b/res/scripts/injectIndex.js index c0e2ae6..beaef2b 100644 --- a/res/scripts/injectIndex.js +++ b/res/scripts/injectIndex.js @@ -1,15 +1,24 @@ - -const {app} = require("electron") +const { + app +} = require("electron") const pkgHack = { idx: 0, - data: [true, true, true, false, false] + data: [ + true, + true, + true, + false, + false, + true, + false // app.js isPackaged -> waring + ] } Object.defineProperty(app, 'isPackaged', { - get() { - let ret = pkgHack.data[pkgHack.idx++] - if(ret === undefined) ret = true; - // console.log("get isPackaged", ret) - return ret; - }, - + get() { + let ret = pkgHack.data[pkgHack.idx++] + if (ret === undefined) ret = true; + // console.log("get isPackaged", ret) + return ret; + }, + }); \ No newline at end of file diff --git a/tools/fix-other.sh b/tools/fix-other.sh index fe52bee..52b48cd 100755 --- a/tools/fix-other.sh +++ b/tools/fix-other.sh @@ -41,12 +41,12 @@ mv "app/main/temp.js" "app/main/index.js" notice "====app.js====" notice "屏蔽检测" -grep -lr 'if(!Ue){' --exclude="app.asar" . -sed -i 's#if(!Ue){#if(false\&\&!Ue){#' app/main/app.js -grep -lr '}z2\[zD' --exclude="app.asar" . -sed -i 's#}z2\[zD#}false\&\&z2\[zD#' app/main/app.js -grep -lr 'if(!zX){' --exclude="app.asar" . -sed -i 's#if(!zX){#if(false\&\&!zX){#' app/main/app.js +grep -lr 'if(!fD){' --exclude="app.asar" . +sed -i 's#if(!fD){#if(false\&\&!fD){#' app/main/app.js +# grep -lr '}X5\[XY' --exclude="app.asar" . +# sed -i 's#}X5\[XY#}false\&\&X5\[XY#' app/main/app.js +grep -lr 'if(!Xz){' --exclude="app.asar" . +sed -i 's#if(!Xz){#if(false\&\&!Xz){#' app/main/app.js # grep -lr ';}!c8' --exclude="app.asar" . # sed -i 's#;}!c8#;}false\&\&!c8#' app/main/app.js