🧣 feat: 更新微博去广告

This commit is contained in:
SVE1R 2024-01-10 14:20:41 +08:00
parent 9151c4cad8
commit 7b0bae3e39
3 changed files with 7 additions and 13 deletions

View File

@ -6,11 +6,11 @@
// @TgChannel https://t.me/ddgksf2021
// @Contribute https://t.me/ddgksf2013_bot
// @Feedback 📮 ddgksf2013@163.com 📮
// @UpdateTime 2023-09-28
// @UpdateTime 2024-01-05
// @Attention 微博、微博国际版净化,现已二合一,使用中若有问题请发邮件!
// @Suitable 自行观看“# > ”注释内容
// @Attention 如需引用请注明出处,谢谢合作!
// @Version V2.0.91
// @Version V2.0.93
// @ScriptURL https://github.com/ddgksf2013/Rewrite/raw/master/AdBlock/Weibo.conf
// ==/UserScript==

View File

@ -1,5 +1,4 @@
const version = 'V2.0.120';
const version = 'V2.0.122';
const mainConfig = {
@ -84,8 +83,7 @@ const mainConfig = {
"php?a=search_topic": "removeSearchTopic",
"v1/ad/realtime": "removeRealtimeAd",
"v1/ad/preload": "removeAdPreload",
"php?a=open_app": "removeAdBanner",
"groups/allgroups": "removeGroup"
"php?a=open_app": "removeAdBanner"
};
function getModifyMethod(e) {
@ -99,10 +97,6 @@ function removeRealtimeAd(e) {
return delete e.ads, e.code = 4016, e
}
function removeGroup(e) {
return e.pageDatas && (e.pageDatas = Object.values(e.pageDatas).filter(e => "homeExtend" != e.pageDataType)), e
}
function removeAdBanner(e) {
return e.data.close_ad_setting && delete e.data.close_ad_setting, e.data.detail_banner_ad && (e.data.detail_banner_ad = []), e
}
@ -197,7 +191,7 @@ function removeSearchMain(e) {
}
function checkSearchWindow(e) {
return !!mainConfig.removeSearchWindow && "card" == e.category && (e.data?.itemid == "finder_window" || e.data?.itemid == "more_frame" || e.data?.card_type == 208 || e.data?.card_type == 217 || e.data?.card_type == 101 || e.data?.card_type == 19 || e.data?.mblog?.page_info?.actionlog?.source?.includes("ad"))
return !!mainConfig.removeSearchWindow && "card" == e.category && (e.data?.itemid == "finder_window" || e.data?.itemid == "more_frame" || e.data?.card_type == 208 || e.data?.card_type == 247 || e.data?.card_type == 217 || e.data?.card_type == 101 || e.data?.card_type == 19 || e.data?.mblog?.page_info?.actionlog?.source?.includes("ad"))
}
function removeSearch(e) {

File diff suppressed because one or more lines are too long