🧣 chore: 优化微博相关内容
This commit is contained in:
parent
47596d3bd1
commit
f3262ee1f2
|
@ -6,30 +6,33 @@
|
|||
// @TgChannel https://t.me/ddgksf2021
|
||||
// @Contribute https://t.me/ddgksf2013_bot
|
||||
// @Feedback 📮 ddgksf2013@163.com 📮
|
||||
// @UpdateTime 2023-02-25
|
||||
// @UpdateTime 2023-03-04
|
||||
// @Attention 微博、微博国际版净化,现已二合一,使用中若有问题请发邮件!
|
||||
// @Function 让你更加愉悦的刷微博
|
||||
// @Suitable 自行观看“# > ”注释内容
|
||||
// @Attention 如需引用请注明出处,谢谢合作!
|
||||
// @Version V2.0.67
|
||||
// @Version V2.0.71
|
||||
// @ScriptURL https://github.com/ddgksf2013/Rewrite/raw/master/AdBlock/Weibo.conf
|
||||
// ==/UserScript==
|
||||
|
||||
|
||||
hostname = api.weibo.*, *.api.weibo.*, mapi.weibo.*, *.uve.weibo.com, new.vip.weibo.cn, boot.biz.weibo.com
|
||||
|
||||
# > 微博_请手动添加以下分流至本地@ddgksf2013
|
||||
; host, sdkapp.uve.weibo.com, direct
|
||||
; host, boot.biz.weibo.com, reject
|
||||
|
||||
|
||||
# > 微博_每日一次的开屏广告请求@ddgksf2013
|
||||
^https?:\/\/boot\.biz\.weibo\.com\/v1\/ad\/realtime url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/boot\.biz\.weibo\.com\/v1\/ad\/realtime url reject-200
|
||||
# > 微博_视频信息处理@ddgksf2013
|
||||
^https?:\/\/api\.weibo\.cn\/\d\/video\/tiny_stream_mid_detail url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/api\.weibo\.cn\/\d\/video\/tiny_stream_mid_detail url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
# > 微博_去除底部超话栏表层浮icon及tips@ddgksf2013
|
||||
^https?:\/\/api\.weibo\.cn\/\d\/!\/huati\/discovery_home_bottom_getdotinfo url reject-dict
|
||||
# > 微博_屏蔽首页左上角每日的弹窗tips@ddgksf2013
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d/push/daily url reject-dict
|
||||
# > 微博_屏蔽发现页面搜索框热词@ddgksf2013
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/\w{5}\/cardlist url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/\w{5}\/cardlist url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
# > 微博_应用内弹窗广告@ddgksf2013
|
||||
^https?:\/\/(preload-click|preload-impression)\.uve\.weibo\.com\/(interface\/wbpullad\/wbpullad_click\.php|wbapplua\/get_wbpullad_log\.lua) url reject
|
||||
# > 微博_屏蔽sdkconfig请求@ddgksf2013
|
||||
|
@ -37,19 +40,19 @@ hostname = api.weibo.*, *.api.weibo.*, mapi.weibo.*, *.uve.weibo.com, new.vip.we
|
|||
# > 微博_Spotlight@ddgksf2013
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/hot\/hours_spotlight url reject-dict
|
||||
# > 微博_自定义tab皮肤@zmqcherish
|
||||
^https://api.weibo.cn/2/!/client/light_skin url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https://api.weibo.cn/2/!/client/light_skin url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
# > 微博_非会员设置tab皮肤@zmqcherish
|
||||
^https://new.vip.weibo.cn/littleskin/preview url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https://new.vip.weibo.cn/littleskin/preview url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
# > 微博_去广告以及去除各部分推广模块@zmqcherish,@ddgksf2013
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/(searchall|page\?|messageflow) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/statuses/(unread_)?friends(/|_)timeline url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/groups/timeline url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/statuses/(container_timeline|unread_hot_timeline|extend|video_mixtimeline|unread_topic_timeline) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/profile/(me|container_timeline) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/video/(community_tab|remind_info|tiny_stream_video_list) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/search/(finder|container_timeline|container_discover) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/(checkin/show|\!/live/media_homelist|comments/build_comments|container/get_item) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/cardlist url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/(searchall|page\?|messageflow) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/statuses/(unread_)?friends(/|_)timeline url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/groups/timeline url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/statuses/(container_timeline|unread_hot_timeline|extend|video_mixtimeline|unread_topic_timeline) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/profile/(me|container_timeline) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/video/(community_tab|remind_info|tiny_stream_video_list) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/search/(finder|container_timeline|container_discover) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/(checkin/show|\!/live/media_homelist|comments/build_comments|container/get_item) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/cardlist url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
# > 微博国际版_屏蔽hotsearch@ddgksf2013
|
||||
^https?:\/\/weibointl\.api\.weibo\.c(n|om)\/portal\.php\?a=hot_search_users url reject-dict
|
||||
# > 微博国际版_屏蔽热推荐@ddgksf2013
|
||||
|
@ -59,12 +62,12 @@ hostname = api.weibo.*, *.api.weibo.*, mapi.weibo.*, *.uve.weibo.com, new.vip.we
|
|||
# > 微博国际版_屏蔽search_topic@shiro
|
||||
^https?:\/\/weibointl\.api\.weibo\.c(n|om)\/portal\.php.*feed&a=search_topic url echo-response text/html echo-response https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_search_topic.json
|
||||
# > 微博国际版_屏蔽开屏广告@ddgksf2013
|
||||
^https?:\/\/weibointl\.api\.weibo\.c(n|om)\/portal\.php.*get_coopen_ads url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/weibointl\.api\.weibo\.c(n|om)\/portal\.php.*get_coopen_ads url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
# > 微博国际版_屏蔽sdkad@ddgksf2013
|
||||
^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
# > 微博国际版_趋势顶部Card去广告@ddgksf2013
|
||||
^https?:\/\/weibointl\.api\.weibo\.c(n|om)\/portal\.php.*feed&a=trends url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/weibointl\.api\.weibo\.c(n|om)\/portal\.php.*feed&a=trends url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
# > 微博国际版_屏蔽用户VIP栏@ddgksf2013
|
||||
^https?:\/\/weibointl\.api\.weibo\.cn\/portal\.php\?a=user_center url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/weibointl\.api\.weibo\.cn\/portal\.php\?a=user_center url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
# > 微博国际版_热搜处理@ddgksf2013
|
||||
^https?:\/\/weibointl\.api\.weibo\.cn\/portal\.php\?a=search_topic url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/weibointl\.api\.weibo\.cn\/portal\.php\?a=search_topic url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
|
@ -6,12 +6,12 @@
|
|||
// @TgChannel https://t.me/ddgksf2021
|
||||
// @Contribute https://t.me/ddgksf2013_bot
|
||||
// @Feedback 📮 ddgksf2013@163.com 📮
|
||||
// @UpdateTime 2023-02-25
|
||||
// @UpdateTime 2023-03-04
|
||||
// @Attention 微博、微博国际版净化,现已二合一,使用中若有问题请发邮件!
|
||||
// @Function 让你更加愉悦的刷微博
|
||||
// @Suitable 自行观看“# > ”注释内容
|
||||
// @Attention 如需引用请注明出处,谢谢合作!
|
||||
// @Version V2.0.67
|
||||
// @Version V2.0.71
|
||||
// @ScriptURL https://github.com/ddgksf2013/Rewrite/raw/master/AdBlock/Weibo.conf
|
||||
// ==/UserScript==
|
||||
|
||||
|
@ -77,25 +77,26 @@
|
|||
# [+]2023-02-22 58、处理信息流中视频左上角的"红包派送中"Tag[code not added]
|
||||
# [+]2023-02-25 59、处理用户反馈的微博国际版‘微博会员’推广CARD
|
||||
# [+]2023-02-25 60、修改MITM写法,使小火箭工具能够MITM本重写的域名[后续新的重写配置也将注意此问题]
|
||||
|
||||
# [+]2023-03-04 61、调整boot.biz.weibo.com屏蔽策略,缩短微博应用启动时间,提高用户使用体验[或在本地添加分流host,boot.biz.weibo.com,reject(Anti已包含)]
|
||||
|
||||
hostname = api.weibo.*, *.api.weibo.*, mapi.weibo.*, *.uve.weibo.com, new.vip.weibo.cn, boot.biz.weibo.com
|
||||
|
||||
|
||||
# > 微博_请手动添加以下分流至本地@ddgksf2013
|
||||
; host, sdkapp.uve.weibo.com, direct
|
||||
; host, boot.biz.weibo.com, reject
|
||||
|
||||
|
||||
# > 微博_每日一次的开屏广告请求@ddgksf2013
|
||||
^https?:\/\/boot\.biz\.weibo\.com\/v1\/ad\/realtime url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/boot\.biz\.weibo\.com\/v1\/ad\/realtime url reject-200
|
||||
# > 微博_视频信息处理@ddgksf2013
|
||||
^https?:\/\/api\.weibo\.cn\/\d\/video\/tiny_stream_mid_detail url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/api\.weibo\.cn\/\d\/video\/tiny_stream_mid_detail url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
# > 微博_去除底部超话栏表层浮icon及tips@ddgksf2013
|
||||
^https?:\/\/api\.weibo\.cn\/\d\/!\/huati\/discovery_home_bottom_getdotinfo url reject-dict
|
||||
# > 微博_屏蔽首页左上角每日的弹窗tips@ddgksf2013
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d/push/daily url reject-dict
|
||||
# > 微博_屏蔽发现页面搜索框热词@ddgksf2013
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/\w{5}\/cardlist url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/\w{5}\/cardlist url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
# > 微博_应用内弹窗广告@ddgksf2013
|
||||
^https?:\/\/(preload-click|preload-impression)\.uve\.weibo\.com\/(interface\/wbpullad\/wbpullad_click\.php|wbapplua\/get_wbpullad_log\.lua) url reject
|
||||
# > 微博_屏蔽sdkconfig请求@ddgksf2013
|
||||
|
@ -103,19 +104,19 @@ hostname = api.weibo.*, *.api.weibo.*, mapi.weibo.*, *.uve.weibo.com, new.vip.we
|
|||
# > 微博_Spotlight@ddgksf2013
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/hot\/hours_spotlight url reject-dict
|
||||
# > 微博_自定义tab皮肤@zmqcherish
|
||||
^https://api.weibo.cn/2/!/client/light_skin url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https://api.weibo.cn/2/!/client/light_skin url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
# > 微博_非会员设置tab皮肤@zmqcherish
|
||||
^https://new.vip.weibo.cn/littleskin/preview url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https://new.vip.weibo.cn/littleskin/preview url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
# > 微博_去广告以及去除各部分推广模块@zmqcherish,@ddgksf2013
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/(searchall|page\?|messageflow) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/statuses/(unread_)?friends(/|_)timeline url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/groups/timeline url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/statuses/(container_timeline|unread_hot_timeline|extend|video_mixtimeline|unread_topic_timeline) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/profile/(me|container_timeline) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/video/(community_tab|remind_info|tiny_stream_video_list) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/search/(finder|container_timeline|container_discover) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/(checkin/show|\!/live/media_homelist|comments/build_comments|container/get_item) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/cardlist url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/(searchall|page\?|messageflow) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/statuses/(unread_)?friends(/|_)timeline url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/groups/timeline url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/statuses/(container_timeline|unread_hot_timeline|extend|video_mixtimeline|unread_topic_timeline) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/profile/(me|container_timeline) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/video/(community_tab|remind_info|tiny_stream_video_list) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/search/(finder|container_timeline|container_discover) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/(checkin/show|\!/live/media_homelist|comments/build_comments|container/get_item) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/cardlist url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
# > 微博国际版_屏蔽hotsearch@ddgksf2013
|
||||
^https?:\/\/weibointl\.api\.weibo\.c(n|om)\/portal\.php\?a=hot_search_users url reject-dict
|
||||
# > 微博国际版_屏蔽热推荐@ddgksf2013
|
||||
|
@ -125,12 +126,12 @@ hostname = api.weibo.*, *.api.weibo.*, mapi.weibo.*, *.uve.weibo.com, new.vip.we
|
|||
# > 微博国际版_屏蔽search_topic@shiro
|
||||
^https?:\/\/weibointl\.api\.weibo\.c(n|om)\/portal\.php.*feed&a=search_topic url echo-response text/html echo-response https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_search_topic.json
|
||||
# > 微博国际版_屏蔽开屏广告@ddgksf2013
|
||||
^https?:\/\/weibointl\.api\.weibo\.c(n|om)\/portal\.php.*get_coopen_ads url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/weibointl\.api\.weibo\.c(n|om)\/portal\.php.*get_coopen_ads url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
# > 微博国际版_屏蔽sdkad@ddgksf2013
|
||||
^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
# > 微博国际版_趋势顶部Card去广告@ddgksf2013
|
||||
^https?:\/\/weibointl\.api\.weibo\.c(n|om)\/portal\.php.*feed&a=trends url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/weibointl\.api\.weibo\.c(n|om)\/portal\.php.*feed&a=trends url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
# > 微博国际版_屏蔽用户VIP栏@ddgksf2013
|
||||
^https?:\/\/weibointl\.api\.weibo\.cn\/portal\.php\?a=user_center url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/weibointl\.api\.weibo\.cn\/portal\.php\?a=user_center url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
||||
# > 微博国际版_热搜处理@ddgksf2013
|
||||
^https?:\/\/weibointl\.api\.weibo\.cn\/portal\.php\?a=search_topic url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_json.js
|
||||
^https?:\/\/weibointl\.api\.weibo\.cn\/portal\.php\?a=search_topic url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo.min.js
|
|
@ -3,6 +3,9 @@ host-keyword,weibo,Weibo
|
|||
host-suffix,weibo.com,Weibo
|
||||
host-suffix,weibo.cn,Weibo
|
||||
|
||||
# > Weibo ADs
|
||||
host,boot.biz.weibo.com,reject
|
||||
|
||||
# > Weibo Api
|
||||
host-suffix,api.weibo.cn,Weibo
|
||||
host-suffix,api.weibo.com,Weibo
|
||||
|
@ -12,8 +15,8 @@ host-suffix,dns.weibo.cn,Weibo
|
|||
host-suffix,weibocdn.com,Weibo
|
||||
|
||||
# > Weibo Client & SDK
|
||||
host-suffix,wbapp.mobile.sina.cn,Reject
|
||||
host-suffix,sdkapp.mobile.sina.cn,Reject
|
||||
host-suffix,wbapp.mobile.sina.cn,reject
|
||||
host-suffix,sdkapp.mobile.sina.cn,reject
|
||||
|
||||
# > Weibo Img
|
||||
host-suffix,sinajs.cn,Weibo
|
||||
|
|
|
@ -0,0 +1,598 @@
|
|||
/***********************************************
|
||||
> 应用名称:墨鱼自用微博&微博国际版净化脚本
|
||||
> 脚本作者:@ddgksf2013, @Zmqcherish
|
||||
> 微信账号:墨鱼手记
|
||||
> 更新时间:2022-02-25
|
||||
> 通知频道:https://t.me/ddgksf2021
|
||||
> 贡献投稿:https://t.me/ddgksf2013_bot
|
||||
> 原作者库:https://github.com/zmqcherish
|
||||
> 问题反馈:ddgksf2013@163.com
|
||||
> 特别提醒:如需转载请注明出处,谢谢合作!
|
||||
> 脚本声明:本脚本是在Zmqcherish原创基础上优化自用
|
||||
> 脚本声明:若有侵犯原作者权利,请邮箱联系删除
|
||||
***********************************************/
|
||||
|
||||
const version = "V2.0.101";
|
||||
|
||||
const mainConfig = {
|
||||
isDebug: !1,
|
||||
author: "ddgksf2013",
|
||||
removeHomeVip: !0,
|
||||
removeHomeCreatorTask: !0,
|
||||
removeRelate: !0,
|
||||
removeGood: !0,
|
||||
removeFollow: !0,
|
||||
modifyMenus: !0,
|
||||
removeRelateItem: !1,
|
||||
removeRecommendItem: !0,
|
||||
removeRewardItem: !0,
|
||||
removeLiveMedia: !0,
|
||||
removeNextVideo: !1,
|
||||
removePinedTrending: !0,
|
||||
removeInterestFriendInTopic: !1,
|
||||
removeInterestTopic: !1,
|
||||
removeInterestUser: !0,
|
||||
removeLvZhou: !0,
|
||||
removeSearchWindow: !0,
|
||||
profileSkin1: null,
|
||||
profileSkin2: null,
|
||||
tabIconVersion: 0,
|
||||
tabIconPath: "",
|
||||
},
|
||||
itemMenusConfig = {
|
||||
creator_task: !1,
|
||||
mblog_menus_custom: !1,
|
||||
mblog_menus_video_later: !0,
|
||||
mblog_menus_comment_manager: !0,
|
||||
mblog_menus_avatar_widget: !1,
|
||||
mblog_menus_card_bg: !1,
|
||||
mblog_menus_long_picture: !0,
|
||||
mblog_menus_delete: !0,
|
||||
mblog_menus_edit: !0,
|
||||
mblog_menus_edit_history: !0,
|
||||
mblog_menus_edit_video: !0,
|
||||
mblog_menus_sticking: !0,
|
||||
mblog_menus_open_reward: !0,
|
||||
mblog_menus_novelty: !1,
|
||||
mblog_menus_favorite: !0,
|
||||
mblog_menus_promote: !0,
|
||||
mblog_menus_modify_visible: !0,
|
||||
mblog_menus_copy_url: !0,
|
||||
mblog_menus_follow: !0,
|
||||
mblog_menus_video_feedback: !0,
|
||||
mblog_menus_shield: !0,
|
||||
mblog_menus_report: !0,
|
||||
mblog_menus_apeal: !0,
|
||||
mblog_menus_home: !0,
|
||||
},
|
||||
modifyCardsUrls = ["/cardlist", "video/community_tab", "/searchall"],
|
||||
modifyStatusesUrls = [
|
||||
"statuses/friends/timeline",
|
||||
"statuses/unread_friends_timeline",
|
||||
"statuses/unread_hot_timeline",
|
||||
"groups/timeline",
|
||||
"statuses/friends_timeline",
|
||||
],
|
||||
otherUrls = {
|
||||
"/profile/me": "removeHome",
|
||||
"/statuses/extend": "itemExtendHandler",
|
||||
"/video/remind_info": "removeVideoRemind",
|
||||
"/checkin/show": "removeCheckin",
|
||||
"/live/media_homelist": "removeMediaHomelist",
|
||||
"/comments/build_comments": "removeComments",
|
||||
"/container/get_item": "containerHandler",
|
||||
"/profile/container_timeline": "userHandler",
|
||||
"/video/tiny_stream_video_list": "nextVideoHandler",
|
||||
"/2/statuses/video_mixtimeline": "nextVideoHandler",
|
||||
"video/tiny_stream_mid_detail": "nextVideoHandler",
|
||||
"/!/client/light_skin": "tabSkinHandler",
|
||||
"/littleskin/preview": "skinPreviewHandler",
|
||||
"/search/finder": "removeSearchMain",
|
||||
"/search/container_timeline": "removeSearch",
|
||||
"/search/container_discover": "removeSearch",
|
||||
"/2/messageflow": "removeMsgAd",
|
||||
"/2/page?": "removePage",
|
||||
"/statuses/unread_topic_timeline": "topicHandler",
|
||||
"square&pageDataType": "squareHandler",
|
||||
"/statuses/container_timeline_topic": "removeMain",
|
||||
"/statuses/container_timeline": "removeMainTab",
|
||||
"wbapplua/wbpullad.lua": "removeLuaScreenAds",
|
||||
"interface/sdk/sdkad.php": "removePhpScreenAds",
|
||||
"ct=feed&a=trends": "removeTopics",
|
||||
user_center: "modifiedUserCenter",
|
||||
"a=get_coopen_ads": "removeIntlOpenAds",
|
||||
"php?a=search_topic": "removeSearchTopic",
|
||||
"v1/ad/realtime": "removeRealtimeAd",
|
||||
};
|
||||
function getModifyMethod(e) {
|
||||
for (let t of modifyCardsUrls) if (e.indexOf(t) > -1) return "removeCards";
|
||||
for (let o of modifyStatusesUrls)
|
||||
if (e.indexOf(o) > -1) return "removeTimeLine";
|
||||
for (let [i, r] of Object.entries(otherUrls)) if (e.indexOf(i) > -1) return r;
|
||||
return null;
|
||||
}
|
||||
function removeRealtimeAd(e) {
|
||||
return delete e.ads, (e.code = 4016), e;
|
||||
}
|
||||
function removeIntlOpenAds(e) {
|
||||
return (
|
||||
e.data &&
|
||||
0 !== e.data.length &&
|
||||
((e.data.ad_list = []),
|
||||
(e.data.gdt_video_ad_ios = []),
|
||||
(e.data.display_ad = 0),
|
||||
(e.data.ad_ios_id = null),
|
||||
(e.data.app_ad_ios_id = null),
|
||||
(e.data.reserve_ad_ios_id = ""),
|
||||
(e.data.reserve_app_ad_ios_id = ""),
|
||||
(e.data.ad_duration = 604800),
|
||||
(e.data.ad_cd_interval = 604800),
|
||||
(e.data.pic_ad = [])),
|
||||
e
|
||||
);
|
||||
}
|
||||
function removeSearchTopic(e) {
|
||||
return (
|
||||
e.data &&
|
||||
0 !== e.data.length &&
|
||||
(e.data = Object.values(e.data).filter((e) => "searchtop" != e.type)),
|
||||
e
|
||||
);
|
||||
}
|
||||
function modifiedUserCenter(e) {
|
||||
return (
|
||||
e.data &&
|
||||
0 !== e.data.length &&
|
||||
e.data.cards &&
|
||||
(e.data.cards = Object.values(e.data.cards).filter(
|
||||
(e) => "personal_vip" != e.items[0].type
|
||||
)),
|
||||
e
|
||||
);
|
||||
}
|
||||
function removeTopics(e) {
|
||||
return e.data && (e.data.order = ["search_topic", "native_content"]), e;
|
||||
}
|
||||
function isAd(e) {
|
||||
return (
|
||||
!!e &&
|
||||
("广告" == e.mblogtypename ||
|
||||
"热推" == e.mblogtypename ||
|
||||
e.promotion?.type == "ad" ||
|
||||
e.page_info?.actionlog?.source == "ad" ||
|
||||
e.content_auth_info?.content_auth_title == "广告")
|
||||
);
|
||||
}
|
||||
function squareHandler(e) {
|
||||
return e.items, e;
|
||||
}
|
||||
function removeMainTab(e) {
|
||||
if (
|
||||
(e.loadedInfo && e.loadedInfo.headers && delete e.loadedInfo.headers,
|
||||
!e.items)
|
||||
)
|
||||
return e;
|
||||
let t = [];
|
||||
for (let o of e.items)
|
||||
isAd(o.data) ||
|
||||
(o.data?.common_struct && delete o.data.common_struct,
|
||||
o.category
|
||||
? "group" != o.category
|
||||
? t.push(o)
|
||||
: -1 != JSON.stringify(o.items).indexOf("profile_top") && t.push(o)
|
||||
: t.push(o));
|
||||
return (e.items = t), log("removeMainTab success"), e;
|
||||
}
|
||||
function removeMain(e) {
|
||||
if (
|
||||
(e.loadedInfo && e.loadedInfo.headers && delete e.loadedInfo.headers,
|
||||
!e.items)
|
||||
)
|
||||
return e;
|
||||
let t = [];
|
||||
for (let o of e.items)
|
||||
if ("feed" == o.category) isAd(o.data) || t.push(o);
|
||||
else if ("group" == o.category) {
|
||||
if (
|
||||
o.items.length > 0 &&
|
||||
o.items[0].data?.itemid?.includes("search_input")
|
||||
)
|
||||
(o.items = o.items.filter(
|
||||
(e) =>
|
||||
e?.data?.itemid?.includes("mine_topics") ||
|
||||
e?.data?.itemid?.includes("search_input")
|
||||
)),
|
||||
(o.items[0].data.hotwords = [{ word: "搜索超话", tip: "" }]),
|
||||
t.push(o);
|
||||
else {
|
||||
if (
|
||||
o.items.length > 0 &&
|
||||
o.items[0].data?.itemid?.includes("top_title")
|
||||
)
|
||||
continue;
|
||||
o.items.length > 0
|
||||
? (o.items = Object.values(o.items).filter(
|
||||
(e) => "feed" == e.category
|
||||
))
|
||||
: t.push(o);
|
||||
}
|
||||
} else -1 == [202, 200].indexOf(o.data.card_type) && t.push(o);
|
||||
return (e.items = t), log("removeMain success"), e;
|
||||
}
|
||||
function topicHandler(e) {
|
||||
let t = e.cards;
|
||||
if (!t || (!mainConfig.removeUnfollowTopic && !mainConfig.removeUnusedPart))
|
||||
return e;
|
||||
let o = [];
|
||||
for (let i of t) {
|
||||
let r = !0;
|
||||
if (i.mblog) {
|
||||
let n = i.mblog.buttons;
|
||||
mainConfig.removeUnfollowTopic && n && "follow" == n[0].type && (r = !1);
|
||||
} else {
|
||||
if (!mainConfig.removeUnusedPart) continue;
|
||||
if ("bottom_mix_activity" == i.itemid) r = !1;
|
||||
else if (i?.top?.title == "正在活跃") r = !1;
|
||||
else if (200 == i.card_type && i.group) r = !1;
|
||||
else {
|
||||
let a = i.card_group;
|
||||
if (!a) continue;
|
||||
if (
|
||||
[
|
||||
"guess_like_title",
|
||||
"cats_top_title",
|
||||
"chaohua_home_readpost_samecity_title",
|
||||
].indexOf(a[0].itemid) > -1
|
||||
)
|
||||
r = !1;
|
||||
else if (a.length > 1) {
|
||||
let d = [];
|
||||
for (let s of a)
|
||||
-1 ==
|
||||
["chaohua_discovery_banner_1", "bottom_mix_activity"].indexOf(
|
||||
s.itemid
|
||||
) && d.push(s);
|
||||
i.card_group = d;
|
||||
}
|
||||
}
|
||||
}
|
||||
r && o.push(i);
|
||||
}
|
||||
return (e.cards = o), log("topicHandler success"), e;
|
||||
}
|
||||
function removeSearchMain(e) {
|
||||
let t = e.channelInfo.channels;
|
||||
if (!t) return e;
|
||||
let o = [];
|
||||
for (let i of t) i.payload && (removeSearch(i.payload), o.push(i));
|
||||
return (e.channelInfo.channels = o), log("remove_search main success"), 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"))
|
||||
);
|
||||
}
|
||||
function removeSearch(e) {
|
||||
if (!e.items) return e;
|
||||
let t = [];
|
||||
for (let o of e.items)
|
||||
if ("feed" == o.category) isAd(o.data) || t.push(o);
|
||||
else {
|
||||
if ("group" == o.category) continue;
|
||||
checkSearchWindow(o) || t.push(o);
|
||||
}
|
||||
return (
|
||||
(e.items = t),
|
||||
e.loadedInfo &&
|
||||
((e.loadedInfo.searchBarContent = []),
|
||||
e.loadedInfo.headerBack &&
|
||||
(e.loadedInfo.headerBack.channelStyleMap = {})),
|
||||
log("remove_search success"),
|
||||
e
|
||||
);
|
||||
}
|
||||
function removeMsgAd(e) {
|
||||
if (!e.messages) return;
|
||||
let t = [];
|
||||
for (let o of e.messages) !o.msg_card?.ad_tag && t.push(o);
|
||||
return (e.messages = t), e;
|
||||
}
|
||||
function removePage(e) {
|
||||
return (
|
||||
removeCards(e),
|
||||
mainConfig.removePinedTrending &&
|
||||
e.cards &&
|
||||
e.cards.length > 0 &&
|
||||
e.cards[0].card_group &&
|
||||
(e.cards[0].card_group = e.cards[0].card_group.filter(
|
||||
(e) =>
|
||||
!(
|
||||
e?.actionlog?.ext?.includes("ads_word") ||
|
||||
e?.itemid?.includes("t:51") ||
|
||||
e?.itemid?.includes("ads_word")
|
||||
)
|
||||
)),
|
||||
e
|
||||
);
|
||||
}
|
||||
function removeCards(e) {
|
||||
if ((e.hotwords && (e.hotwords = []), !e.cards)) return;
|
||||
let t = [];
|
||||
for (let o of e.cards) {
|
||||
if (17 == o.card_type || 58 == o.card_type) continue;
|
||||
let i = o.card_group;
|
||||
if (i && i.length > 0) {
|
||||
let r = [];
|
||||
for (let n of i)
|
||||
118 == n.card_type ||
|
||||
isAd(n.mblog) ||
|
||||
-1 != JSON.stringify(n).indexOf("res_from:ads") ||
|
||||
r.push(n);
|
||||
(o.card_group = r), t.push(o);
|
||||
} else {
|
||||
let a = o.card_type;
|
||||
if ([9, 165].indexOf(a) > -1) isAd(o.mblog) || t.push(o);
|
||||
else {
|
||||
if ([1007, 180].indexOf(a) > -1) continue;
|
||||
t.push(o);
|
||||
}
|
||||
}
|
||||
}
|
||||
e.cards = t;
|
||||
}
|
||||
function lvZhouHandler(e) {
|
||||
if (!mainConfig.removeLvZhou || !e) return;
|
||||
let t = e.common_struct;
|
||||
if (!t) return;
|
||||
let o = [];
|
||||
for (let i of t) "绿洲" != i.name && o.push(i);
|
||||
e.common_struct = o;
|
||||
}
|
||||
function isBlock(e) {
|
||||
let t = mainConfig.blockIds || [];
|
||||
if (0 === t.length) return !1;
|
||||
let o = e.user.id;
|
||||
for (let i of t) if (i == o) return !0;
|
||||
return !1;
|
||||
}
|
||||
function removeTimeLine(e) {
|
||||
for (let t of ["ad", "advertises", "trends", "headers"]) e[t] && delete e[t];
|
||||
if (!e.statuses) return;
|
||||
let o = [];
|
||||
for (let i of e.statuses)
|
||||
isAd(i) ||
|
||||
(lvZhouHandler(i),
|
||||
i.common_struct && delete i.common_struct,
|
||||
i.category ? "group" != i.category && o.push(i) : o.push(i));
|
||||
e.statuses = o;
|
||||
}
|
||||
function removeHomeVip(e) {
|
||||
return e.header && e.header.vipView && (e.header.vipView = null), e;
|
||||
}
|
||||
function removeVideoRemind(e) {
|
||||
(e.bubble_dismiss_time = 0),
|
||||
(e.exist_remind = !1),
|
||||
(e.image_dismiss_time = 0),
|
||||
(e.image = ""),
|
||||
(e.tag_image_english = ""),
|
||||
(e.tag_image_english_dark = ""),
|
||||
(e.tag_image_normal = ""),
|
||||
(e.tag_image_normal_dark = "");
|
||||
}
|
||||
function itemExtendHandler(e) {
|
||||
if (
|
||||
(mainConfig.removeRelate || mainConfig.removeGood) &&
|
||||
e.trend &&
|
||||
e.trend.titles
|
||||
) {
|
||||
let t = e.trend.titles.title;
|
||||
mainConfig.removeRelate && "相关推荐" === t
|
||||
? delete e.trend
|
||||
: mainConfig.removeGood && "博主好物种草" === t && delete e.trend;
|
||||
}
|
||||
mainConfig.removeFollow && e.follow_data && (e.follow_data = null),
|
||||
mainConfig.removeRewardItem && e.reward_info && (e.reward_info = null),
|
||||
e.page_alerts && (e.page_alerts = null);
|
||||
try {
|
||||
e.trend.extra_struct.extBtnInfo.btn_picurl.indexOf(
|
||||
"timeline_icon_ad_delete"
|
||||
) > -1 && delete e.trend;
|
||||
} catch (o) {}
|
||||
if (mainConfig.modifyMenus && e.custom_action_list) {
|
||||
let i = [];
|
||||
for (let r of e.custom_action_list) {
|
||||
let n = r.type,
|
||||
a = itemMenusConfig[n];
|
||||
void 0 === a
|
||||
? i.push(r)
|
||||
: "mblog_menus_copy_url" === n
|
||||
? i.unshift(r)
|
||||
: a && i.push(r);
|
||||
}
|
||||
e.custom_action_list = i;
|
||||
}
|
||||
}
|
||||
function updateFollowOrder(e) {
|
||||
try {
|
||||
for (let t of e.items)
|
||||
if ("mainnums_friends" === t.itemId) {
|
||||
let o = t.click.modules[0].scheme;
|
||||
(t.click.modules[0].scheme = o.replace(
|
||||
"231093_-_selfrecomm",
|
||||
"231093_-_selffollowed"
|
||||
)),
|
||||
log("updateFollowOrder success");
|
||||
return;
|
||||
}
|
||||
} catch (i) {
|
||||
console.log("updateFollowOrder fail");
|
||||
}
|
||||
}
|
||||
function updateProfileSkin(e, t) {
|
||||
try {
|
||||
let o = mainConfig[t];
|
||||
if (!o) return;
|
||||
let i = 0;
|
||||
for (let r of e.items)
|
||||
if (r.image)
|
||||
try {
|
||||
(dm = r.image.style.darkMode),
|
||||
"alpha" != dm && (r.image.style.darkMode = "alpha"),
|
||||
(r.image.iconUrl = o[i++]),
|
||||
r.dot && (r.dot = []);
|
||||
} catch (n) {}
|
||||
log("updateProfileSkin success");
|
||||
} catch (a) {
|
||||
console.log("updateProfileSkin fail");
|
||||
}
|
||||
}
|
||||
function removeHome(e) {
|
||||
if (!e.items) return e;
|
||||
let t = [];
|
||||
for (let o of e.items) {
|
||||
let i = o.itemId;
|
||||
if ("profileme_mine" == i)
|
||||
mainConfig.removeHomeVip && (o = removeHomeVip(o)),
|
||||
o.header?.vipIcon && delete o.header.vipIcon,
|
||||
updateFollowOrder(o),
|
||||
t.push(o);
|
||||
else if ("100505_-_top8" == i)
|
||||
updateProfileSkin(o, "profileSkin1"), t.push(o);
|
||||
else if ("100505_-_newcreator" == i)
|
||||
"grid" == o.type
|
||||
? (updateProfileSkin(o, "profileSkin2"), t.push(o))
|
||||
: mainConfig.removeHomeCreatorTask || t.push(o);
|
||||
else {
|
||||
if (
|
||||
"100505_-_chaohua" != i &&
|
||||
"100505_-_manage" != i &&
|
||||
"100505_-_recentlyuser" != i
|
||||
)
|
||||
continue;
|
||||
o.images?.length > 0 &&
|
||||
(o.images = o.images.filter(
|
||||
(e) =>
|
||||
"100505_-_chaohua" == e.itemId ||
|
||||
"100505_-_recentlyuser" == e.itemId
|
||||
)),
|
||||
t.push(o);
|
||||
}
|
||||
}
|
||||
return (e.items = t), e;
|
||||
}
|
||||
function removeCheckin(e) {
|
||||
log("remove tab1签到"), (e.show = 0);
|
||||
}
|
||||
function removeMediaHomelist(e) {
|
||||
mainConfig.removeLiveMedia && (log("remove 首页直播"), (e.data = {}));
|
||||
}
|
||||
function removeComments(e) {
|
||||
let t = ["广告", "廣告", "相关内容", "推荐", "热推", "推薦"],
|
||||
o = e.datas || [];
|
||||
if (0 === o.length) return;
|
||||
let i = [];
|
||||
for (let r of o) {
|
||||
let n = r.adType || "";
|
||||
-1 == t.indexOf(n) && 6 != r.type && i.push(r);
|
||||
}
|
||||
log("remove 评论区相关和推荐内容"), (e.datas = i);
|
||||
}
|
||||
function containerHandler(e) {
|
||||
mainConfig.removeInterestFriendInTopic &&
|
||||
"超话里的好友" === e.card_type_name &&
|
||||
(log("remove 超话里的好友"), (e.card_group = [])),
|
||||
mainConfig.removeInterestTopic &&
|
||||
e.itemid &&
|
||||
(e.itemid.indexOf("infeed_may_interest_in") > -1
|
||||
? (log("remove 感兴趣的超话"), (e.card_group = []))
|
||||
: e.itemid.indexOf("infeed_friends_recommend") > -1 &&
|
||||
(log("remove 超话好友关注"), (e.card_group = [])));
|
||||
}
|
||||
function userHandler(e) {
|
||||
if (((e = removeMainTab(e)), !mainConfig.removeInterestUser || !e.items))
|
||||
return e;
|
||||
let t = [];
|
||||
for (let o of e.items) {
|
||||
let i = !0;
|
||||
if ("group" == o.category)
|
||||
try {
|
||||
"可能感兴趣的人" == o.items[0].data.desc && (i = !1);
|
||||
} catch (r) {}
|
||||
i && (o.data?.common_struct && delete o.data.common_struct, t.push(o));
|
||||
}
|
||||
return (e.items = t), log("removeMain sub success"), e;
|
||||
}
|
||||
function nextVideoHandler(e) {
|
||||
if (!e.statuses) return e;
|
||||
let t = [];
|
||||
for (let o of e.statuses)
|
||||
if (!isAd(o)) {
|
||||
let i = ["forward_redpacket_info", "shopping", "float_info", "tags"];
|
||||
for (let r of i) o.video_info?.[r] && delete o.video_info[r];
|
||||
t.push(o);
|
||||
}
|
||||
return (e.statuses = t), log("removeMainTab Success"), e;
|
||||
}
|
||||
function tabSkinHandler(e) {
|
||||
try {
|
||||
let t = mainConfig.tabIconVersion;
|
||||
if (((e.data.canUse = 1), !t || !mainConfig.tabIconPath || t < 100)) return;
|
||||
let o = e.data.list;
|
||||
for (let i of o) (i.version = t), (i.downloadlink = mainConfig.tabIconPath);
|
||||
log("tabSkinHandler success");
|
||||
} catch (r) {
|
||||
log("tabSkinHandler fail");
|
||||
}
|
||||
}
|
||||
function skinPreviewHandler(e) {
|
||||
e.data.skin_info.status = 1;
|
||||
}
|
||||
function removeLuaScreenAds(e) {
|
||||
if (!e.cached_ad) return e;
|
||||
for (let t of e.cached_ad.ads)
|
||||
(t.start_date = 1893254400),
|
||||
(t.show_count = 0),
|
||||
(t.duration = 0),
|
||||
(t.end_date = 1893340799);
|
||||
return e;
|
||||
}
|
||||
function removePhpScreenAds(e) {
|
||||
if (!e.ads) return e;
|
||||
for (let t of ((e.show_push_splash_ad = !1),
|
||||
(e.background_delay_display_time = 0),
|
||||
(e.lastAdShow_delay_display_time = 0),
|
||||
(e.realtime_ad_video_stall_time = 0),
|
||||
(e.realtime_ad_timeout_duration = 0),
|
||||
e.ads))
|
||||
(t.displaytime = 0),
|
||||
(t.displayintervel = 86400),
|
||||
(t.allowdaydisplaynum = 0),
|
||||
(t.displaynum = 0),
|
||||
(t.displaytime = 1),
|
||||
(t.begintime = "2029-12-30 00:00:00"),
|
||||
(t.endtime = "2029-12-30 23:59:59");
|
||||
return e;
|
||||
}
|
||||
function log(e) {
|
||||
mainConfig.isDebug && console.log(e);
|
||||
}
|
||||
var body = $response.body,
|
||||
url = $request.url;
|
||||
let method = getModifyMethod(url);
|
||||
if (method) {
|
||||
log(method);
|
||||
var func = eval(method);
|
||||
let data = JSON.parse(body.match(/\{.*\}/)[0]);
|
||||
new func(data),
|
||||
(body = JSON.stringify(data)),
|
||||
"removePhpScreenAds" == method && (body = JSON.stringify(data) + "OK");
|
||||
}
|
||||
$done({ body });
|
File diff suppressed because one or more lines are too long
|
@ -1,218 +0,0 @@
|
|||
/*
|
||||
README:https://github.com/yichahucha/surge/tree/master
|
||||
*/
|
||||
|
||||
const path1 = "/groups/timeline";
|
||||
const path2 = "/statuses/unread";
|
||||
const path3 = "/statuses/extend";
|
||||
const path4 = "/comments/build_comments";
|
||||
const path5 = "/photo/recommend_list";
|
||||
const path6 = "/stories/video_stream";
|
||||
const path7 = "/statuses/positives/get";
|
||||
const path8 = "/stories/home_list";
|
||||
const path9 = "/profile/statuses";
|
||||
const path10 = "/statuses/friends/timeline";
|
||||
const path11 = "/service/picfeed";
|
||||
const path12 = "/fangle/timeline";
|
||||
const path13 = "/searchall";
|
||||
const path14 = "/cardlist";
|
||||
const path15 = "/statuses/video_timeline";
|
||||
const path16 = "/page";
|
||||
const path17 = "/statuses/friends_timeline";
|
||||
const path18 = "/!/photos/pic_recommend_status";
|
||||
const path19 = "/statuses/video_mixtimeline";
|
||||
const path20 = "/video/tiny_stream_video_list";
|
||||
const path21 = "/photo/info";
|
||||
const path22 = "/live/media_homelist";
|
||||
const path23 = "/remind/unread_count";
|
||||
|
||||
const url = $request.url;
|
||||
let body = $response.body;
|
||||
|
||||
if (
|
||||
url.indexOf(path1) !== -1 ||
|
||||
url.indexOf(path2) !== -1 ||
|
||||
url.indexOf(path10) !== -1 ||
|
||||
url.indexOf(path15) !== -1 ||
|
||||
url.indexOf(path17) !== -1 ||
|
||||
url.indexOf(path20) !== -1
|
||||
) {
|
||||
let obj = JSON.parse(body);
|
||||
if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses);
|
||||
if (obj.advertises) obj.advertises = [];
|
||||
if (obj.ad) obj.ad = [];
|
||||
if (obj.num) obj.num = obj.original_num;
|
||||
if (obj.trends) obj.trends = [];
|
||||
body = JSON.stringify(obj);
|
||||
} else if (url.indexOf(path3) !== -1) {
|
||||
let obj = JSON.parse(body);
|
||||
if (obj.trend) delete obj.trend;
|
||||
body = JSON.stringify(obj);
|
||||
} else if (url.indexOf(path4) !== -1) {
|
||||
let obj = JSON.parse(body);
|
||||
obj.recommend_max_id = 0;
|
||||
if (obj.status) {
|
||||
if (obj.top_hot_structs) {
|
||||
obj.max_id = obj.top_hot_structs.call_back_struct.max_id;
|
||||
delete obj.top_hot_structs;
|
||||
}
|
||||
if (obj.datas) obj.datas = filter_comments(obj.datas);
|
||||
} else {
|
||||
obj.datas = [];
|
||||
}
|
||||
body = JSON.stringify(obj);
|
||||
} else if (url.indexOf(path5) !== -1 || url.indexOf(path18) !== -1) {
|
||||
let obj = JSON.parse(body);
|
||||
obj.data = {};
|
||||
body = JSON.stringify(obj);
|
||||
} else if (url.indexOf(path6) !== -1) {
|
||||
let obj = JSON.parse(body);
|
||||
let segments = obj.segments;
|
||||
if (segments && segments.length > 0) {
|
||||
let i = segments.length;
|
||||
while (i--) {
|
||||
const element = segments[i];
|
||||
let is_ad = element.is_ad;
|
||||
if (is_ad && is_ad === true) segments.splice(i, 1);
|
||||
}
|
||||
}
|
||||
body = JSON.stringify(obj);
|
||||
} else if (url.indexOf(path7) !== -1) {
|
||||
let obj = JSON.parse(body);
|
||||
obj.datas = [];
|
||||
body = JSON.stringify(obj);
|
||||
} else if (url.indexOf(path8) !== -1) {
|
||||
let obj = JSON.parse(body);
|
||||
obj.story_list = [];
|
||||
body = JSON.stringify(obj);
|
||||
} else if (url.indexOf(path11) !== -1 || url.indexOf(path22) !== -1) {
|
||||
let obj = JSON.parse(body);
|
||||
obj.data = [];
|
||||
body = JSON.stringify(obj);
|
||||
} else if (
|
||||
url.indexOf(path9) !== -1 ||
|
||||
url.indexOf(path12) !== -1 ||
|
||||
url.indexOf(path13) !== -1 ||
|
||||
url.indexOf(path14) !== -1 ||
|
||||
url.indexOf(path16) !== -1
|
||||
) {
|
||||
let obj = JSON.parse(body);
|
||||
if (obj.cards) obj.cards = filter_timeline_cards(obj.cards);
|
||||
body = JSON.stringify(obj);
|
||||
} else if (url.indexOf(path19) !== -1) {
|
||||
let obj = JSON.parse(body);
|
||||
delete obj.expandable_view;
|
||||
if (obj.hasOwnProperty("expandable_views")) delete obj.expandable_views;
|
||||
body = JSON.stringify(obj);
|
||||
} else if (url.indexOf(path21) !== -1) {
|
||||
if (body.indexOf("ad_params") !== -1) {
|
||||
body = JSON.stringify({});
|
||||
}
|
||||
} else if (url.indexOf(path23) !== -1) {
|
||||
let obj = JSON.parse(body);
|
||||
obj.video = {};
|
||||
body = JSON.stringify(obj);
|
||||
}
|
||||
$done({ body });
|
||||
|
||||
function filter_timeline_statuses(statuses) {
|
||||
if (statuses && statuses.length > 0) {
|
||||
let i = statuses.length;
|
||||
while (i--) {
|
||||
let element = statuses[i];
|
||||
if (
|
||||
is_timeline_likerecommend(element.title) ||
|
||||
is_timeline_ad(element) ||
|
||||
is_stream_video_ad(element)
|
||||
) {
|
||||
statuses.splice(i, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return statuses;
|
||||
}
|
||||
|
||||
function filter_comments(datas) {
|
||||
if (datas && datas.length > 0) {
|
||||
let i = datas.length;
|
||||
while (i--) {
|
||||
const element = datas[i];
|
||||
const type = element.type;
|
||||
if (type === 5 || type === 1 || type === 6) datas.splice(i, 1);
|
||||
}
|
||||
}
|
||||
return datas;
|
||||
}
|
||||
|
||||
function filter_timeline_cards(cards) {
|
||||
if (cards && cards.length > 0) {
|
||||
let j = cards.length;
|
||||
while (j--) {
|
||||
let item = cards[j];
|
||||
let card_group = item.card_group;
|
||||
if (card_group && card_group.length > 0) {
|
||||
if (item.itemid && item.itemid === "hotword") {
|
||||
filter_top_search(card_group);
|
||||
} else {
|
||||
let i = card_group.length;
|
||||
while (i--) {
|
||||
let card_group_item = card_group[i];
|
||||
let card_type = card_group_item.card_type;
|
||||
if (card_type) {
|
||||
if (card_type === 9) {
|
||||
if (is_timeline_ad(card_group_item.mblog))
|
||||
card_group.splice(i, 1);
|
||||
} else if (card_type === 118 || card_type === 89) {
|
||||
card_group.splice(i, 1);
|
||||
} else if (card_type === 42) {
|
||||
if (
|
||||
card_group_item.desc ===
|
||||
"\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba"
|
||||
) {
|
||||
cards.splice(j, 1);
|
||||
break;
|
||||
}
|
||||
} else if (card_type === 17) {
|
||||
filter_top_search(card_group_item.group);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let card_type = item.card_type;
|
||||
if (card_type && card_type === 9) {
|
||||
if (is_timeline_ad(item.mblog)) cards.splice(j, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return cards;
|
||||
}
|
||||
|
||||
function filter_top_search(group) {
|
||||
if (group && group.length > 0) {
|
||||
let k = group.length;
|
||||
while (k--) {
|
||||
let group_item = group[k];
|
||||
if (group_item.hasOwnProperty("promotion")) {
|
||||
group.splice(k, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function is_timeline_ad(mblog) {
|
||||
if (!mblog) return false;
|
||||
let promotiontype =
|
||||
mblog.promotion && mblog.promotion.type && mblog.promotion.type === "ad";
|
||||
let mblogtype = mblog.mblogtype && mblog.mblogtype === 1;
|
||||
return !!(promotiontype || mblogtype);
|
||||
}
|
||||
|
||||
function is_timeline_likerecommend(title) {
|
||||
return !!(title && title.type && title.type === "likerecommend");
|
||||
}
|
||||
|
||||
function is_stream_video_ad(item) {
|
||||
return item.ad_state && item.ad_state === 1;
|
||||
}
|
|
@ -1,200 +0,0 @@
|
|||
/*
|
||||
Weibo remove ads
|
||||
|
||||
[rewrite_local]
|
||||
^https?://m?api\.weibo\.c(n|om)/2/(statuses/(unread|extend|positives/get|(friends|video)(/|_)timeline)|stories/(video_stream|home_list)|(groups|fangle)/timeline|profile/statuses|comments/build_comments|photo/recommend_list|service/picfeed|searchall|cardlist|page|\!/photos/pic_recommend_status) url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/wb_ad.js
|
||||
^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://raw.githubusercontent.com/NobyDa/Script/master/QuantumultX/File/wb_launch.js
|
||||
[mitm]
|
||||
hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com
|
||||
*/
|
||||
|
||||
const path1 = "/groups/timeline";
|
||||
const path2 = "/statuses/unread";
|
||||
const path3 = "/statuses/extend";
|
||||
const path4 = "/comments/build_comments";
|
||||
const path5 = "/photo/recommend_list";
|
||||
const path6 = "/stories/video_stream";
|
||||
const path7 = "/statuses/positives/get";
|
||||
const path8 = "/stories/home_list";
|
||||
const path9 = "/profile/statuses";
|
||||
const path10 = "/statuses/friends/timeline";
|
||||
const path11 = "/service/picfeed";
|
||||
const path12 = "/fangle/timeline";
|
||||
const path13 = "/searchall";
|
||||
const path14 = "/cardlist";
|
||||
const path15 = "/statuses/video_timeline";
|
||||
const path16 = "/page";
|
||||
const path17 = "/statuses/friends_timeline";
|
||||
const path18 = "/!/photos/pic_recommend_status";
|
||||
const path19 = "/statuses/video_mixtimeline";
|
||||
|
||||
const url = $request.url;
|
||||
var body = $response.body;
|
||||
|
||||
if (
|
||||
url.indexOf(path1) != -1 ||
|
||||
url.indexOf(path2) != -1 ||
|
||||
url.indexOf(path10) != -1 ||
|
||||
url.indexOf(path15) != -1 ||
|
||||
url.indexOf(path17) != -1
|
||||
) {
|
||||
let obj = JSON.parse(body);
|
||||
if (obj.statuses) obj.statuses = filter_timeline_statuses(obj.statuses);
|
||||
if (obj.advertises) obj.advertises = [];
|
||||
if (obj.ad) obj.ad = [];
|
||||
if (obj.num) obj.num = obj.original_num;
|
||||
if (obj.trends) obj.trends = [];
|
||||
body = JSON.stringify(obj);
|
||||
}
|
||||
|
||||
if (url.indexOf(path3) != -1) {
|
||||
let obj = JSON.parse(body);
|
||||
if (obj.trend) delete obj.trend;
|
||||
body = JSON.stringify(obj);
|
||||
}
|
||||
|
||||
if (url.indexOf(path4) != -1) {
|
||||
let obj = JSON.parse(body);
|
||||
obj.recommend_max_id = 0;
|
||||
if (obj.status) {
|
||||
if (obj.top_hot_structs) {
|
||||
obj.max_id = obj.top_hot_structs.call_back_struct.max_id;
|
||||
delete obj.top_hot_structs;
|
||||
}
|
||||
if (obj.datas) obj.datas = filter_comments(obj.datas);
|
||||
} else {
|
||||
obj.datas = [];
|
||||
}
|
||||
body = JSON.stringify(obj);
|
||||
}
|
||||
|
||||
if (url.indexOf(path5) != -1 ||
|
||||
url.indexOf(path18) != -1) {
|
||||
let obj = JSON.parse(body);
|
||||
obj.data = {};
|
||||
body = JSON.stringify(obj);
|
||||
}
|
||||
|
||||
if (url.indexOf(path6) != -1) {
|
||||
let obj = JSON.parse(body);
|
||||
let segments = obj.segments;
|
||||
if (segments && segments.length > 0) {
|
||||
let i = segments.length;
|
||||
while (i--) {
|
||||
const element = segments[i];
|
||||
let is_ad = element.is_ad;
|
||||
if (is_ad && is_ad == true) segments.splice(i, 1);
|
||||
}
|
||||
}
|
||||
body = JSON.stringify(obj);
|
||||
}
|
||||
|
||||
if (url.indexOf(path7) != -1) {
|
||||
let obj = JSON.parse(body);
|
||||
obj.datas = [];
|
||||
body = JSON.stringify(obj);
|
||||
}
|
||||
|
||||
if (url.indexOf(path8) != -1) {
|
||||
let obj = JSON.parse(body);
|
||||
obj.story_list = [];
|
||||
body = JSON.stringify(obj);
|
||||
}
|
||||
|
||||
if (url.indexOf(path11) != -1) {
|
||||
let obj = JSON.parse(body);
|
||||
obj.data = [];
|
||||
body = JSON.stringify(obj);
|
||||
}
|
||||
|
||||
if (
|
||||
url.indexOf(path9) != -1 ||
|
||||
url.indexOf(path12) != -1 ||
|
||||
url.indexOf(path13) != -1 ||
|
||||
url.indexOf(path14) != -1 ||
|
||||
url.indexOf(path16) != -1
|
||||
) {
|
||||
let obj = JSON.parse(body);
|
||||
if (obj.cards) obj.cards = filter_timeline_cards(obj.cards);
|
||||
body = JSON.stringify(obj);
|
||||
}
|
||||
|
||||
if (url.indexOf(path19) != -1) {
|
||||
let obj = JSON.parse(body);
|
||||
delete obj.expandable_view;
|
||||
body = JSON.stringify(obj);
|
||||
}
|
||||
|
||||
$done({ body });
|
||||
|
||||
function filter_timeline_statuses(statuses) {
|
||||
if (statuses && statuses.length > 0) {
|
||||
let i = statuses.length;
|
||||
while (i--) {
|
||||
let element = statuses[i];
|
||||
if (is_timeline_likerecommend(element.title)) statuses.splice(i, 1);
|
||||
if (is_timeline_ad(element)) statuses.splice(i, 1);
|
||||
}
|
||||
}
|
||||
return statuses;
|
||||
}
|
||||
|
||||
function filter_comments(datas) {
|
||||
if (datas && datas.length > 0) {
|
||||
let i = datas.length;
|
||||
while (i--) {
|
||||
const element = datas[i];
|
||||
let type = element.type;
|
||||
if (type == 5 || type == 1 || type == 6) datas.splice(i, 1);
|
||||
}
|
||||
}
|
||||
return datas;
|
||||
}
|
||||
|
||||
function filter_timeline_cards(cards) {
|
||||
if (cards && cards.length > 0) {
|
||||
let j = cards.length;
|
||||
while (j--) {
|
||||
let item = cards[j];
|
||||
let card_group = item.card_group;
|
||||
if (card_group && card_group.length > 0) {
|
||||
let i = card_group.length;
|
||||
while (i--) {
|
||||
let card_group_item = card_group[i];
|
||||
let card_type = card_group_item.card_type;
|
||||
if (card_type) {
|
||||
if (card_type == 9) {
|
||||
if (is_timeline_ad(card_group_item.mblog)) card_group.splice(i, 1);
|
||||
} else if (card_type == 118 || card_type == 89) {
|
||||
card_group.splice(i, 1);
|
||||
} else if (card_type == 42) {
|
||||
if (card_group_item.desc == '\u53ef\u80fd\u611f\u5174\u8da3\u7684\u4eba') {
|
||||
cards.splice(j, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let card_type = item.card_type;
|
||||
if (card_type && card_type == 9) {
|
||||
if (is_timeline_ad(item.mblog)) cards.splice(j, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return cards;
|
||||
}
|
||||
|
||||
function is_timeline_ad(mblog) {
|
||||
if (!mblog) return false;
|
||||
let promotiontype = mblog.promotion && mblog.promotion.type && mblog.promotion.type == "ad";
|
||||
let mblogtype = mblog.mblogtype && mblog.mblogtype == 1;
|
||||
return (promotiontype || mblogtype) ? true : false;
|
||||
}
|
||||
|
||||
function is_timeline_likerecommend(title) {
|
||||
return title && title.type && title.type == "likerecommend" ? true : false;
|
||||
}
|
||||
|
||||
// by yichahucha
|
|
@ -1,39 +0,0 @@
|
|||
//参考@yichahucha 的脚本
|
||||
|
||||
const launchAdUrl1 = '/interface/sdk/sdkad.php';
|
||||
const launchAdUrl2 = '/wbapplua/wbpullad.lua';
|
||||
|
||||
// function needModify(url) {
|
||||
// if(url.indexOf(launchAdUrl1) > -1 || url.indexOf(launchAdUrl2) > -1) {
|
||||
// return true;
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
function modifyMain(url, data) {
|
||||
if(url.indexOf(launchAdUrl1) > -1) {
|
||||
let temp = data.match(/\{.*\}/);
|
||||
if(!temp) return data;
|
||||
data = JSON.parse(temp);
|
||||
if (data.ads) data.ads = [];
|
||||
if (data.background_delay_display_time) data.background_delay_display_time = 60 * 60 * 24 * 1000;
|
||||
if (data.show_push_splash_ad) data.show_push_splash_ad = false;
|
||||
return JSON.stringify(data) + 'OK';
|
||||
}
|
||||
if(url.indexOf(launchAdUrl2) > -1) {
|
||||
data = JSON.parse(data);
|
||||
if (data.cached_ad && data.cached_ad.ads) {
|
||||
data.cached_ad.ads = [];
|
||||
}
|
||||
return JSON.stringify(data);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
var body = $response.body;
|
||||
var url = $request.url;
|
||||
// if(needModify(url)) {
|
||||
body = modifyMain(url, body);
|
||||
// }
|
||||
|
||||
$done(body);
|
|
@ -1,26 +0,0 @@
|
|||
/*
|
||||
README:https://github.com/yichahucha/surge/tree/master
|
||||
*/
|
||||
|
||||
const path1 = "/interface/sdk/sdkad.php";
|
||||
const path2 = "/wbapplua/wbpullad.lua";
|
||||
|
||||
const url = $request.url;
|
||||
let body = $response.body;
|
||||
let obj;
|
||||
if (url.indexOf(path1) !== -1) {
|
||||
let re = /\{.*}/;
|
||||
body = body.match(re);
|
||||
obj = JSON.parse(body);
|
||||
if (obj.background_delay_display_time) obj.background_delay_display_time = 60*60*24*365;
|
||||
if (obj.show_push_splash_ad) obj.show_push_splash_ad = false;
|
||||
if (obj.ads) obj.ads = [];
|
||||
body = JSON.stringify(obj) + 'OK';
|
||||
}
|
||||
if (url.indexOf(path2) !== -1) {
|
||||
obj = JSON.parse(body);
|
||||
if (obj.cached_ad && obj.cached_ad.ads) obj.cached_ad.ads = [];
|
||||
body = JSON.stringify(obj);
|
||||
}
|
||||
|
||||
$done({body});
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue