添加boxjs订阅,配合boxjs设置B站首页屏蔽UP主 (#312)

添加boxjs订阅,配合boxjs设置B站首页屏蔽UP主
This commit is contained in:
chouchoui
2021-04-19 13:12:21 +08:00
committed by GitHub
parent fa6ed9933b
commit 53e4ca872f
36 changed files with 561 additions and 17 deletions

View File

@ -1,6 +1,18 @@
const scriptName = 'BiliBili';
const storyAidKey = 'story_aid';
let magicJS = MagicJS(scriptName, 'INFO');
const blackKey = 'blackmatrix7_bilibili_feed_black';
//Customize blacklist
let blacklist = [];
if (magicJS.read(blackKey)){
blacklist = magicJS.read(blackKey).split(';');
} else {
const defaultList = '';
magicJS.write(blackKey, defaultList);
blacklist = defaultList.split(';');
}
;(() => {
let body = null;
if (magicJS.isResponse){
@ -24,7 +36,12 @@ let magicJS = MagicJS(scriptName, 'INFO');
items.push(item);
}
}
else if (!item.hasOwnProperty('ad_info') && (item['card_type'] === 'small_cover_v2' || item['card_type'] === 'large_cover_v1')){
else if (
!item.hasOwnProperty('ad_info') &&
!blacklist.includes(item['args']['up_name']) &&
item.card_goto.indexOf('ad') === -1 &&
(item['card_type'] === 'small_cover_v2' || item['card_type'] === 'large_cover_v1')
){
items.push(item);
}
}