From d9dc2d06f4caee12e29b68ee6bd46973def8c727 Mon Sep 17 00:00:00 2001 From: chouchoui <14866249+chouchoui@users.noreply.github.com> Date: Mon, 29 Aug 2022 15:13:43 +0800 Subject: [PATCH] =?UTF-8?q?feat(bilibili):=20=E5=88=A0=E9=99=A4=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E7=9A=84=E7=AB=96=E5=B1=8F=E6=A8=A1=E5=BC=8F=E5=85=A5?= =?UTF-8?q?=E5=8F=A3=20(#691)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes blackmatrix7/ios_rule_script#668 --- script/bilibili/bilibili_plus.js | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/script/bilibili/bilibili_plus.js b/script/bilibili/bilibili_plus.js index ef3d5a35cb8..9d31898110a 100644 --- a/script/bilibili/bilibili_plus.js +++ b/script/bilibili/bilibili_plus.js @@ -84,31 +84,21 @@ const enableMall = Boolean(magicJS.read(bilibili_enable_mall)); // 545 首页追番tab,442 开始为概念版id 适配港澳台代理模式 const tabList = new Set([39, 40, 41, 545, 151, 442, 99, 100, 101, 554, 556]); // 尝试使用tab name直观修改 - const tabNameList = new Set(["直播", "推荐", "热门", "动画", "影视"]); - // 107 概念版游戏中心,获取修改为Story模式 - const topList = new Set([176, 222, 107]); + const tabNameList = new Set(["直播", "推荐", "热门", "动画", "追番", "影视"]); + // 222 游戏中心 107 概念版游戏中心 + // 176 消息中心 + const topList = new Set([176]); // 102 开始为概念版id const bottomList = new Set([177, 178, 179, 181, 102, 103, 104, 105, 106]); let obj = JSON.parse(magicJS.response.body); if (obj["data"]["tab"]) { let tab = obj["data"]["tab"].filter((e) => { - return tabNameList.has(e.name); + return tabNameList.has(e.name) || tabList.has(e.id); }); obj["data"]["tab"] = tab; } - // 将 id(222 & 107)调整为Story功能按钮 - let storyAid = magicJS.read(storyAidKey); - if (!storyAid) { - storyAid = "246834163"; - } if (obj["data"]["top"]) { let top = obj["data"]["top"].filter((e) => { - if (e.id === 222 || e.id === 107) { - e.uri = `bilibili://story/${storyAid}`; - e.icon = "https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/bilibili/bilibili_icon.png"; - e.tab_id = "Story_Top"; - e.name = "Story"; - } return topList.has(e.id); }); obj["data"]["top"] = top;