Skip to content

Commit

Permalink
fix(response)
Browse files Browse the repository at this point in the history
Update response.dev.js
Update response.js
Update protobuf
  • Loading branch information
VirgilClyne committed Nov 5, 2024
1 parent a9c8014 commit 7a5b349
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 14 deletions.
11 changes: 4 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
### 🆕 New Features
* 推薦列表廣告卡去除 by @Yswag
* 视频下方广告去除 by @applepi-icpc

### 🔄 Other Changes
* `打包器``rollup` 更改为 `rspack`
* `util``submodule` 更改为 `package`
### 🛠️ Bug Fixes
* 修复 `DmViewReply` 解析错误
* 修复 `ViewUniteReply` 对象错误
* 修复 `TFInfoReply` 解析错误
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@biliuniverse/adblock",
"version": "0.6.5",
"version": "0.6.6",
"organizationName": "🪐 BiliUniverse",
"displayName": "📺 BiliBili: 🛡️ ADBlock",
"description": "哔哩哔哩:去广告\n自定义去除APP内界面元素",
Expand Down
5 changes: 3 additions & 2 deletions src/response.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down
7 changes: 4 additions & 3 deletions src/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
// 创建空数据
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 7a5b349

Please sign in to comment.