diff --git a/src/protobuf b/src/protobuf index 52ccf84..c28f772 160000 --- a/src/protobuf +++ b/src/protobuf @@ -1 +1 @@ -Subproject commit 52ccf843547339028604c773f7b9cf038162f272 +Subproject commit c28f772f468228be7451721cdb572536e8c835d2 diff --git a/src/response.dev.js b/src/response.dev.js index f0feeae..75f3802 100644 --- a/src/response.dev.js +++ b/src/response.dev.js @@ -9,6 +9,7 @@ import { ModeStatusReply } from "./protobuf/bilibili/app/interface/teenagers.js" import { DmViewReply, DmSegMobileReply } from "./protobuf/bilibili/community/service/dm/v1/dm.js"; import { MainListReply } from "./protobuf/bilibili/main/community/reply/v1/reply.js"; import { SearchAllResponse } from "./protobuf/bilibili/polymer/app/search/v1/search.js"; +import { WireType, UnknownFieldHandler, reflectionMergePartial, MESSAGE_TYPE, MessageType, BinaryReader, isJsonObject, typeofJsonValue, jsonWriteOptions } from "@protobuf-ts/runtime"; /***************** Processing *****************/ // 解构URL const url = new URL($request.url); @@ -587,9 +588,9 @@ log(`⚠ FORMAT: ${FORMAT}`, ""); log("🎉 up主推荐广告去除"); body.cm.sourceContent = []; } - if (data.cm?.content5?.content1?.content2?.content9) { + if (body.cm?.content5?.content1?.content2?.content9) { $.log("🎉 视频下方广告去除"); - delete data.cm.content5.content1.content2.content9; + delete body.cm.content5.content1.content2.content9; } body.tab.tabModule[0].tab.introduction.modules = body.tab.tabModule[0].tab.introduction.modules.map(i => { if (i.type === 28) { diff --git a/src/response.js b/src/response.js index 659ae50..75f3802 100644 --- a/src/response.js +++ b/src/response.js @@ -9,6 +9,7 @@ import { ModeStatusReply } from "./protobuf/bilibili/app/interface/teenagers.js" import { DmViewReply, DmSegMobileReply } from "./protobuf/bilibili/community/service/dm/v1/dm.js"; import { MainListReply } from "./protobuf/bilibili/main/community/reply/v1/reply.js"; import { SearchAllResponse } from "./protobuf/bilibili/polymer/app/search/v1/search.js"; +import { WireType, UnknownFieldHandler, reflectionMergePartial, MESSAGE_TYPE, MessageType, BinaryReader, isJsonObject, typeofJsonValue, jsonWriteOptions } from "@protobuf-ts/runtime"; /***************** Processing *****************/ // 解构URL const url = new URL($request.url); @@ -22,7 +23,7 @@ log(`⚠ FORMAT: ${FORMAT}`, ""); !(async () => { /** * 设置 - * @type {{Settings: import('./types.js').Settings}} + * @type {{Settings: import('./types').Settings}} */ const { Settings, Caches, Configs } = setENV("BiliBili", "ADBlock", database); // 创建空数据 @@ -587,9 +588,9 @@ log(`⚠ FORMAT: ${FORMAT}`, ""); log("🎉 up主推荐广告去除"); body.cm.sourceContent = []; } - if (data.cm?.content5?.content1?.content2?.content9) { + if (body.cm?.content5?.content1?.content2?.content9) { $.log("🎉 视频下方广告去除"); - delete data.cm.content5.content1.content2.content9; + delete body.cm.content5.content1.content2.content9; } body.tab.tabModule[0].tab.introduction.modules = body.tab.tabModule[0].tab.introduction.modules.map(i => { if (i.type === 28) {