🧣feat: 更新微博相关脚本
This commit is contained in:
parent
12262d1e8d
commit
ec6ab7f720
|
@ -1,49 +1,98 @@
|
|||
# 脚本来自: https://github.com/zmqcherish/proxy-script
|
||||
# 支持以下内容:
|
||||
# 删除首页(tab1)流和超话中的广告、热推
|
||||
# 删除视频号(tab2)流中的广告
|
||||
# 删除发现页(tab3)轮播广告图
|
||||
# 删除个人页(tab5)中的创作者中心下方的轮播图、为你推荐、用户任务和VIP一栏(可配置)
|
||||
# 删除微博详情页的广告、相关推荐、微博主好物种草和关注博主模块(可配置)
|
||||
# 删除微博开屏广告 | 参考@yichahucha
|
||||
# 删除tab2菜单中的虚假通知
|
||||
# 删除tab1顶部的签到和直播(可配置)
|
||||
# 删除微博详情页菜单栏的新鲜事头像挂件等(可配置)
|
||||
# 删除微博详情页评论区相关内容(可配置,默认关闭)
|
||||
# 删除微博详情页评论区推荐内容(可配置,默认打开)
|
||||
# 删除超话中可能感兴趣的超话、超话中的好友、超话好友关注、用户页可能感兴趣的人(可配置,默认关闭)
|
||||
# 删除搜索结果页广告
|
||||
# 将个人主页【关注】按钮默认值由【推荐】改为【关注的人】
|
||||
# 自定义个人主页图标(可配置,默认关闭)效果图
|
||||
# 关闭自动播放下一个视频(可配置,默认关闭)
|
||||
# 删除微博详情页打赏模块(可配置,默认关闭)
|
||||
# 自定义底部tab图标(可配置,默认关闭)效果图
|
||||
# 【已删除】移除tab5新任务通知。原样式
|
||||
# 删除绿洲模块(可配置,默认关闭)
|
||||
# 【待定】自定义开屏图片/视频。如有需求,可以考虑开发
|
||||
# 删除个人页【让红包飞】模块
|
||||
# 【03.12更新】新增屏蔽用户功能,如果有不得已需要关注的人(比如某些抽奖关注),但是又不想看TA的内容可以使用此配置。
|
||||
# 【05.22更新】(重新)删除发现页(tab3)轮播广告图,需要配置weibo_config.js -> removeSearchWindow为true。其实轮播中有些不是广告,一起杀
|
||||
# 【07.12更新】 删除消息页动态流的广告
|
||||
# 【08.22更新】 删除超话tab页无关元素(可配置)
|
||||
# 【08.23更新】 删除微博详情页超话新帖和新用户相关提示
|
||||
# 【09.02更新】 删除初次打开搜索页的轮播图
|
||||
# 【09.12更新】 修复超话无法签到bug
|
||||
# 【10.11更新】 移除首页新版广告
|
||||
# 【10.24更新】 移除用户页新版广告
|
||||
// ==UserScript==
|
||||
// @ScriptName 微博&微博国际版净化
|
||||
// @Author @ddgksf2013,@zmqcherish,@shiro
|
||||
// @ForHelp 若有屏蔽广告的需求,可公众号后台回复APP名称
|
||||
// @WechatID 公众号墨鱼手记
|
||||
// @TgChannel https://t.me/ddgksf2021
|
||||
// @Contribute https://t.me/ddgksf2013_bot
|
||||
// @Feedback 📮 ddgksf2013@163.com 📮
|
||||
// @UpdateTime 2022-12-25
|
||||
// @Attention 微博、微博国际版净化,现已二合一,使用中若有问题请发邮件!
|
||||
// @Function 让你更加愉悦的刷微博
|
||||
// @Suitable 自行观看“# > ”注释内容
|
||||
// @Attention 如需引用请注明出处,谢谢合作!
|
||||
// @Version V2.0.14
|
||||
// @ScriptURL https://github.com/ddgksf2013/Rewrite/raw/master/AdBlock/Weibo.conf
|
||||
// ==/UserScript==
|
||||
|
||||
hostname = api.weibo.cn, mapi.weibo.com, *.uve.weibo.com, new.vip.weibo.cn,
|
||||
# 𝐂𝐮𝐭𝐭𝐥𝐞𝐟𝐢𝐬𝐡 𝐒𝐞𝐥𝐟-𝐮𝐬𝐞 𝐑𝐞𝐰𝐫𝐢𝐭𝐞 𝐂𝐨𝐧𝐟𝐢𝐠𝐮𝐫𝐚𝐭𝐢𝐨𝐧 𝐂𝐡𝐚𝐧𝐠𝐞𝐥𝐨𝐠 𝐂𝐫𝐞𝐚𝐭𝐞𝐝 𝐛𝐲 𝐝𝐝𝐠𝐤𝐬𝐟𝟐𝟎𝟏𝟑 𝐚𝐧𝐝 𝐳𝐦𝐪𝐜𝐡𝐞𝐫𝐢𝐬𝐡
|
||||
# [+]202X-XX-XX 01、删除首页(tab1)流和超话中的广告、热推删除视频号(tab2)流中的广告,删除发现页(tab3)轮播广告图
|
||||
# [+]202X-XX-XX 02、删除个人页(tab5)中的创作者中心下方的轮播图、为你推荐、用户任务和VIP一栏(可配置)
|
||||
# [+]202X-XX-XX 03、删除微博详情页的广告、相关推荐、微博主好物种草和关注博主模块(可配置),删除微博开屏广告 | 参考@yichahucha
|
||||
# [+]202X-XX-XX 04、删除tab2菜单中的虚假通知,删除tab1顶部的签到和直播(可配置),删除微博详情页菜单栏的新鲜事头像挂件等(可配置)
|
||||
# [+]202X-XX-XX 05、删除微博详情页评论区相关内容(可配置,默认关闭),删除微博详情页评论区推荐内容(可配置,默认打开)
|
||||
# [+]202X-XX-XX 06、删除超话中可能感兴趣的超话、超话中的好友、超话好友关注、用户页可能感兴趣的人(可配置,默认关闭)
|
||||
# [+]202X-XX-XX 07、删除搜索结果页广告,将个人主页关注按钮默认值由推荐改为关注的人
|
||||
# [+]202X-XX-XX 08、自定义个人主页图标(可配置,默认关闭)效果图,关闭自动播放下一个视频(可配置,默认关闭)
|
||||
# [+]202X-XX-XX 09、删除微博详情页打赏模块(可配置,默认关闭),自定义底部tab图标(可配置,默认关闭)效果图
|
||||
# [+]202X-XX-XX 10、已删除移除tab5新任务通知,原样式,删除绿洲模块(可配置,默认关闭)
|
||||
# [+]202X-XX-XX 11、待定自定义开屏图片/视频。如有需求,可以考虑开发,删除个人页让“红包飞模块”
|
||||
# [+]2022-03-12 12、新增屏蔽用户功能,如果有不得已需要关注的人(比如某些抽奖关注),但是又不想看TA的内容可以使用此配置。
|
||||
# [+]2022-05-22 13、重新删除发现页(tab3)轮播广告图,需要配置weibo_config.js -> removeSearchWindow为true,其实轮播中有些不是广告,一起杀
|
||||
# [+]2022-07-12 14、删除消息页动态流的广告
|
||||
# [+]2022-08-22 15、删除超话tab页无关元素(可配置)
|
||||
# [+]2022-08-23 16、删除微博详情页超话新帖和新用户相关提示
|
||||
# [+]2022-09-02 17、删除初次打开搜索页的轮播图
|
||||
# [+]2022-09-12 18、修复超话无法签到bug
|
||||
# [+]2022-10-11 19、移除首页新版广告
|
||||
# [+]2022-10-24 20、移除用户页新版广告
|
||||
# [+]2022-12-14 21、将微博国际版去广告与微博去广告二合一,删除微博发现页的轮播图,add key removeSearchWindow for true
|
||||
# [+]2022-12-15 22、更换微博国际版去广告的search_topic
|
||||
# [+]2022-12-15 23、微博国际版去广告不再采用单一reject方式,利用脚本去广告
|
||||
# [+]2022-12-15 24、去除微博我的页面“绿荫总动员”条幅,去除微博搜索框填词
|
||||
# [+]2022-12-15 25、修复微博热搜界面“要闻”与“同城”无法打开的bug
|
||||
# [+]2022-12-15 26、去除我的、热搜、文娱列表广告内容
|
||||
# [+]2022-12-16 27、请手动添加后面的分流至本地 host, sdkapp.uve.weibo.com, direct
|
||||
# [+]2022-12-16 28、删除主页顶部“#记录周五的开心时刻#”,去除搜索页面“实况热聊”栏以及group栏
|
||||
# [+]2022-12-16 29、删除微博评论详情页面最底部的“已过滤不当言论,部分评论暂不展示”等文字
|
||||
# [-]2022-12-17 30、脚本weibo_json.js已解除限制,其它工具诸如surge、Loon、小火箭亦可使用
|
||||
# [+]2022-12-18 31、优化超话tab看帖页面,保留搜索(去除自动填充内容)及感兴趣的超话以及去除一些无关group和card
|
||||
# [+]2022-12-20 32、删除超话搜索栏目下方的“可能感兴趣”、“热门超话”、“影视超话”、“游戏超话”等card
|
||||
# [+]2022-12-21 33、去除搜索页面tab中热搜下面一排圆圈图标内容
|
||||
# [+]2022-12-23 34、屏蔽hot_hours_spotlight请求
|
||||
# [+]2022-12-24 35、修复主页浏览动态微博时广告图片的空白占位问题,修复每日首次打开SearchTab页面广告轮播失效问题
|
||||
# [+]2022-12-24 36、删除发现页下拉刷新时的背景广告图片,瞬间清爽
|
||||
# [+]2022-12-24 37、删除微博短视频流中的广告,让你无广告享受刷短视频的快感
|
||||
# [+]2022-12-25 38、删除搜索页面热搜顶部偶尔出现的HotSearchPush
|
||||
|
||||
# 微博去广告以及去除各部分推广模块 - cherish
|
||||
^https?://m?api\.weibo\.c(n|om)/2/(cardlist|searchall|page|messageflow|statuses/(unread_)?friends(/|_)timeline|groups/timeline|statuses/(container_timeline|unread_hot_timeline|extend|video_mixtimeline|unread_topic_timeline)|profile/(me|container_timeline)|video/(community_tab|remind_info|tiny_stream_video_list)|checkin/show|\!/live/media_homelist|comments/build_comments|container/get_item|search/(finder|container_timeline|container_discover)) url script-response-body https://cdn.jsdelivr.net/gh/zmqcherish/proxy-script@main/weibo_main.js
|
||||
|
||||
|
||||
hostname = *api.weibo*, *uve.weibo.com, new.vip.weibo.cn
|
||||
# > 微博_请手动添加以下分流至本地
|
||||
#host, sdkapp.uve.weibo.com, direct
|
||||
# > 微博_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
|
||||
# > 微博_非会员设置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
|
||||
# > 微博_去广告以及去除各部分推广模块@zmqcherish
|
||||
^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
|
||||
# 删除微博开屏广告 - cherish
|
||||
^https?://(sdk|wb)app\.uve\.weibo\.com(/interface/sdk/sdkad.php|/wbapplua/wbpullad.lua) url script-response-body https://cdn.jsdelivr.net/gh/zmqcherish/proxy-script@main/weibo_launch.js
|
||||
|
||||
# 自定义tab皮肤
|
||||
# 如果需要此类型操作,请自行将下行取消注释
|
||||
;^https://api.weibo.cn/2/!/client/light_skin url script-response-body https://cdn.jsdelivr.net/gh/zmqcherish/proxy-script@main/weibo_main.js
|
||||
|
||||
# 非会员设置tab皮肤 - cherish
|
||||
# 如果需要此类型操作,请自行将下行取消注释
|
||||
;^https://new.vip.weibo.cn/littleskin/preview url script-response-body https://cdn.jsdelivr.net/gh/zmqcherish/proxy-script@main/weibo_main.js
|
||||
# > 微博国际版_屏蔽hotsearch@ddgksf2013
|
||||
^https?:\/\/weibointl\.api\.weibo\.c(n|om)\/portal\.php\?a=hot_search_users url reject-dict
|
||||
# > 微博国际版_屏蔽热推荐@ddgksf2013
|
||||
^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/ad\/weibointl\? url reject-dict
|
||||
# > 微博国际版_屏蔽search_suggest@ddgksf2013
|
||||
# ^https?:\/\/m?api\.weibo\.c(n|om)\/\d\/page\/get_search_suggest url reject-dict
|
||||
# > 微博国际版_屏蔽searching_info@ddgksf2013
|
||||
^https?:\/\/weibointl\.api\.weibo\.c(n|om)\/portal\.php.*user&a=get_searching_info url echo-response text/html echo-response https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Weibo/weibo_search_info.json
|
||||
# > 微博国际版_屏蔽search_topic@ddgksf2013
|
||||
^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
|
||||
# > 微博国际版_屏蔽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
|
||||
# > 微博国际版_趋势顶部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
|
||||
# > 微博国际版_屏蔽用户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
|
|
@ -0,0 +1,570 @@
|
|||
/***********************************
|
||||
|
||||
> 应用名称:墨鱼自用QX微博&微博国际版净化
|
||||
> 脚本作者:@Zmqcherish, @Cuttlefish
|
||||
> 微信账号:墨鱼手记
|
||||
> 更新时间:2022-12-25
|
||||
> 通知频道:https://t.me/ddgksf2021
|
||||
> 贡献投稿:https://t.me/ddgksf2013_bot
|
||||
> 原作者库:https://github.com/zmqcherish
|
||||
> 问题反馈:ddgksf2013@163.com
|
||||
> 特别提醒:如需转载请注明出处,谢谢合作!
|
||||
> 脚本声明:特别感谢Zmqcherish的付出,本脚本只是在他原创脚本的基础上优化QX自用
|
||||
> 原创地址:https://github.com/zmqcherish/proxy-script/raw/main/weibo.conf
|
||||
|
||||
***********************************/
|
||||
|
||||
const version = "V2.0.65";
|
||||
|
||||
const mainConfig = {
|
||||
isDebug: !1,
|
||||
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: !1,
|
||||
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",
|
||||
"/!/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",
|
||||
};
|
||||
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, n] of Object.entries(otherUrls)) if (e.indexOf(i) > -1) return n;
|
||||
return null;
|
||||
}
|
||||
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 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.topics && delete e.data.topics,
|
||||
e.data.discover && delete e.data.discover),
|
||||
e
|
||||
);
|
||||
}
|
||||
function isAd(e) {
|
||||
return (
|
||||
!!e &&
|
||||
!!(
|
||||
"广告" == e.mblogtypename ||
|
||||
"热推" == e.mblogtypename ||
|
||||
"廣告" == e.mblogtypename ||
|
||||
"熱推" == e.mblogtypename ||
|
||||
(e.promotion && "ad" == e.promotion.type) ||
|
||||
(e.common_struct && e.common_struct[0]?.actionlog?.source?.includes("ad"))
|
||||
)
|
||||
);
|
||||
}
|
||||
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) || 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;
|
||||
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 n = !0;
|
||||
if (i.mblog) {
|
||||
let r = i.mblog.buttons;
|
||||
mainConfig.removeUnfollowTopic && r && "follow" == r[0].type && (n = !1);
|
||||
} else {
|
||||
if (!mainConfig.removeUnusedPart) continue;
|
||||
if ("bottom_mix_activity" == i.itemid) n = !1;
|
||||
else if (i?.top?.title == "正在活跃") n = !1;
|
||||
else if (200 == i.card_type && i.group) n = !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
|
||||
)
|
||||
n = !1;
|
||||
else if (a.length > 1) {
|
||||
let s = [];
|
||||
for (let d of a)
|
||||
-1 ==
|
||||
["chaohua_discovery_banner_1", "bottom_mix_activity"].indexOf(
|
||||
d.itemid
|
||||
) && s.push(d);
|
||||
i.card_group = s;
|
||||
}
|
||||
}
|
||||
}
|
||||
n && 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 == "hot_search_push" ||
|
||||
e.data?.itemid == "finder_window" ||
|
||||
e.data?.itemid == "more_frame" ||
|
||||
e.data?.card_type == 208 ||
|
||||
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_wor") ||
|
||||
e?.itemid?.includes("t:51") ||
|
||||
e?.itemid?.includes("ads_wor")
|
||||
)
|
||||
)),
|
||||
e
|
||||
);
|
||||
}
|
||||
function removeCards(e) {
|
||||
if (!e.cards) return;
|
||||
let t = [];
|
||||
for (let o of e.cards) {
|
||||
let i = o.card_group;
|
||||
if (i && i.length > 0) {
|
||||
let n = [];
|
||||
for (let r of i) 118 != r.card_type && n.push(r);
|
||||
(o.card_group = n), 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), isBlock(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 n of e.custom_action_list) {
|
||||
let r = n.type,
|
||||
a = itemMenusConfig[r];
|
||||
void 0 === a
|
||||
? i.push(n)
|
||||
: "mblog_menus_copy_url" === r
|
||||
? i.unshift(n)
|
||||
: a && i.push(n);
|
||||
}
|
||||
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 n of e.items)
|
||||
if (n.image)
|
||||
try {
|
||||
(dm = n.image.style.darkMode),
|
||||
"alpha" != dm && (n.image.style.darkMode = "alpha"),
|
||||
(n.image.iconUrl = o[i++]),
|
||||
n.dot && (n.dot = []);
|
||||
} catch (r) {}
|
||||
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)),
|
||||
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 (
|
||||
[
|
||||
"mine_attent_title",
|
||||
"100505_-_meattent_pic",
|
||||
"100505_-_newusertask",
|
||||
"100505_-_vipkaitong",
|
||||
"100505_-_hongbao2022",
|
||||
"100505_-_adphoto",
|
||||
"100505_-_advideo",
|
||||
].indexOf(i) > -1 ||
|
||||
i.match(/100505_-_meattent_-_\d+/)
|
||||
)
|
||||
continue;
|
||||
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 = ["广告", "廣告"];
|
||||
mainConfig.removeRelateItem && t.push(...["相关内容", "相關內容"]),
|
||||
mainConfig.removeRecommendItem &&
|
||||
t.push(...["推荐", "热推", "推薦", "熱推"]);
|
||||
let o = e.datas || [];
|
||||
if (0 === o.length) return;
|
||||
let i = [];
|
||||
for (let n of o) {
|
||||
let r = n.adType || "";
|
||||
-1 == t.indexOf(r) && 6 != n.type && i.push(n);
|
||||
}
|
||||
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 = removeMain(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 (n) {}
|
||||
i && 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) isAd(o) || 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 (n) {
|
||||
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 = 86400),
|
||||
(e.lastAdShow_delay_display_time = 604800),
|
||||
(e.realtime_ad_video_stall_time = 86400),
|
||||
(e.realtime_ad_timeout_duration = 604800),
|
||||
e.ads))
|
||||
(t.displaytime = 0),
|
||||
(t.displayintervel = 86400),
|
||||
(t.allowdaydisplaynum = 0),
|
||||
(t.displaynum = 0),
|
||||
(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 });
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"data": {
|
||||
"expiration_time": "86400",
|
||||
"cards": [{ "tip": "\u641c\u7d22\u5fae\u535a", "word": "" }]
|
||||
},
|
||||
"info": "",
|
||||
"retcode": 0
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"data": [],
|
||||
"info": "",
|
||||
"retcode": 0,
|
||||
"ext": {
|
||||
"search_hot_simple": {
|
||||
"title": "\u70ed\u95e8\u641c\u7d22",
|
||||
"desc": "",
|
||||
"more": "\u66f4\u591a\u70ed\u641c"
|
||||
},
|
||||
"search_hot": {
|
||||
"title": "\u5fae\u535a\u70ed\u641c\u699c",
|
||||
"desc": "\u5b9e\u65f6\u70ed\u70b9\uff0c\u6bcf\u5206\u949f\u66f4\u65b0\u4e00\u6b21",
|
||||
"more": ""
|
||||
},
|
||||
"search_city": {
|
||||
"title": "\u540c\u57ce\u70ed\u70b9",
|
||||
"desc": "",
|
||||
"more": ""
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue