mirror of
https://github.com/Giu-zhao/ios_rule_script
synced 2024-11-26 02:18:26 +08:00
feat(bilibili): 删除重复的竖屏模式入口 (#691)
Closes blackmatrix7/ios_rule_script#668
This commit is contained in:
parent
28bdd904d3
commit
d9dc2d06f4
@ -84,31 +84,21 @@ const enableMall = Boolean(magicJS.read(bilibili_enable_mall));
|
|||||||
// 545 首页追番tab,442 开始为概念版id 适配港澳台代理模式
|
// 545 首页追番tab,442 开始为概念版id 适配港澳台代理模式
|
||||||
const tabList = new Set([39, 40, 41, 545, 151, 442, 99, 100, 101, 554, 556]);
|
const tabList = new Set([39, 40, 41, 545, 151, 442, 99, 100, 101, 554, 556]);
|
||||||
// 尝试使用tab name直观修改
|
// 尝试使用tab name直观修改
|
||||||
const tabNameList = new Set(["直播", "推荐", "热门", "动画", "影视"]);
|
const tabNameList = new Set(["直播", "推荐", "热门", "动画", "追番", "影视"]);
|
||||||
// 107 概念版游戏中心,获取修改为Story模式
|
// 222 游戏中心 107 概念版游戏中心
|
||||||
const topList = new Set([176, 222, 107]);
|
// 176 消息中心
|
||||||
|
const topList = new Set([176]);
|
||||||
// 102 开始为概念版id
|
// 102 开始为概念版id
|
||||||
const bottomList = new Set([177, 178, 179, 181, 102, 103, 104, 105, 106]);
|
const bottomList = new Set([177, 178, 179, 181, 102, 103, 104, 105, 106]);
|
||||||
let obj = JSON.parse(magicJS.response.body);
|
let obj = JSON.parse(magicJS.response.body);
|
||||||
if (obj["data"]["tab"]) {
|
if (obj["data"]["tab"]) {
|
||||||
let tab = obj["data"]["tab"].filter((e) => {
|
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;
|
obj["data"]["tab"] = tab;
|
||||||
}
|
}
|
||||||
// 将 id(222 & 107)调整为Story功能按钮
|
|
||||||
let storyAid = magicJS.read(storyAidKey);
|
|
||||||
if (!storyAid) {
|
|
||||||
storyAid = "246834163";
|
|
||||||
}
|
|
||||||
if (obj["data"]["top"]) {
|
if (obj["data"]["top"]) {
|
||||||
let top = obj["data"]["top"].filter((e) => {
|
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);
|
return topList.has(e.id);
|
||||||
});
|
});
|
||||||
obj["data"]["top"] = top;
|
obj["data"]["top"] = top;
|
||||||
|
Loading…
Reference in New Issue
Block a user