📕 新增 LittleRedBook 相关脚本
This commit is contained in:
parent
aa2ae475c8
commit
f49c7a9565
|
@ -0,0 +1,42 @@
|
|||
|
||||
// ==UserScript==
|
||||
// @ScriptName 小红书去广告
|
||||
// @Author @ddgksf2013
|
||||
// @ForHelp 若有屏蔽广告的需求,可公众号后台回复APP名称
|
||||
// @WechatID 公众号墨鱼手记
|
||||
// @TgChannel https://t.me/ddgksf2021
|
||||
// @Contribute https://t.me/ddgksf2013_bot
|
||||
// @MainFunction 去开屏、瀑布流、启动服务广告及一些隐私、广告、青少年请求
|
||||
// @Feedback 📮 ddgksf2013@163.com 📮
|
||||
// @UpdateTime 2022-11-04
|
||||
// @Function 去广告配置(自用,不定期更新)
|
||||
// @Suitable 自行观看“# > ”注释内容
|
||||
// @Attention 如需引用请注明出处,谢谢合作!
|
||||
// @ScriptURL https://codeberg.org/ddgksf2013/Cuttlefish/raw/branch/master/Rewrite/AdBlock/XiaoHongShu.conf
|
||||
// ==/UserScript==
|
||||
|
||||
|
||||
hostname = edith.xiaohongshu.com,www.xiaohongshu.com,pages.xiaohongshu.com,referee.xiaohongshu.com
|
||||
|
||||
# > XiaoHongShu_小红书_开屏广告@ddgksf2013
|
||||
^https?:\/\/edith\.xiaohongshu\.com\/api\/sns\/v\d\/system_service\/splash_config url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/LittleRedBook/adBlock.js
|
||||
# > XiaoHongShu_小红书_瀑布流@ddgksf2013
|
||||
^https?:\/\/edith\.xiaohongshu\.com\/api\/sns\/v\d\/homefeed\? url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/LittleRedBook/adBlock.js
|
||||
# > XiaoHongShu_小红书_启动处理@ddgksf2013
|
||||
^https?:\/\/edith\.xiaohongshu\.com\/api\/sns\/v\d\/system_service\/config\? url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/LittleRedBook/adBlock.js
|
||||
# > XiaoHongShu_小红书_热词删除@ddgksf2013
|
||||
^https?:\/\/edith\.xiaohongshu\.com\/api\/sns\/v\d\/search\/hot_list url response-body items":\[.+\] response-body items":[]
|
||||
# > XiaoHongShu_小红书_热搜删除@ddgksf2013
|
||||
^https?:\/\/edith\.xiaohongshu\.com\/api\/sns\/v\d\/search\/trending url response-body queries":\[.+\] response-body queries":[]
|
||||
# > XiaoHongShu_小红书_AdEngage@ddgksf2013
|
||||
^https?:\/\/www\.xiaohongshu\.com\/api\/sns\/v\d\/tag\/ads_engage url reject-dict
|
||||
# > XiaoHongShu_小红书_AdRecord@ddgksf2013
|
||||
^https?:\/\/www\.xiaohongshu\.com\/api\/sns\/v\d\/ads\/apple\/record url reject-dict
|
||||
# > XiaoHongShu_小红书_AdResource@ddgksf2013
|
||||
^https?:\/\/www\.xiaohongshu\.com\/api\/sns\/v\d\/ads\/resource url reject-dict
|
||||
# > XiaoHongShu_小红书_Report@ddgksf2013
|
||||
^https?:\/\/referee\.xiaohongshu\.com\/v\d\/stateReport url reject-dict
|
||||
# > XiaoHongShu_小红书_Switches@ddgksf2013
|
||||
^https?:\/\/pages\.xiaohongshu\.com\/data\/native\/matrix_switches url reject-dict
|
||||
# > XiaoHongShu_小红书_Teenager@ddgksf2013
|
||||
^https?:\/\/edith\.xiaohongshu\.com\/api\/sns\/v\d\/user\/teenager\/status url reject-dict
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
version v1.0.1
|
||||
updatetime 2022-11-04
|
||||
tgchannel https://t.me/ddgksf2021
|
||||
function 小红书去开屏广告、瀑布流广告、启动广告
|
||||
author ddgksf2013
|
||||
*/
|
||||
|
||||
if (/^https?:\/\/edith\.xiaohongshu\.com\/api\/sns\/v\d\/system_service\/splash_config/.test($request.url)) {
|
||||
var obj = JSON.parse($response.body);
|
||||
obj.data.ads_groups.forEach((item) => {
|
||||
item.start_time = "2208963661";
|
||||
item.end_time = "2209050061";
|
||||
item.ads.forEach((i) => {
|
||||
i.start_time = "2208963661";
|
||||
i.end_time = "2209050061";
|
||||
});
|
||||
});
|
||||
$done({
|
||||
body: JSON.stringify(obj),
|
||||
});
|
||||
}
|
||||
if (/^https?:\/\/edith\.xiaohongshu\.com\/api\/sns\/v\d\/homefeed\?/.test($request.url)) {
|
||||
var obj = JSON.parse($response.body);
|
||||
obj.data = Object.values(obj.data).filter((item) => !item.is_ads);
|
||||
$done({
|
||||
body: JSON.stringify(obj),
|
||||
});
|
||||
}
|
||||
if (/^https?:\/\/edith\.xiaohongshu\.com\/api\/sns\/v\d\/system_service\/config\?/.test($request.url)) {
|
||||
var obj = JSON.parse($response.body);
|
||||
//obj.data.tabbar.tabs = Object.values(obj.data.tabbar.tabs).filter((item) => !item.title == "购买");
|
||||
delete obj.data.store;
|
||||
delete obj.data.splash;
|
||||
delete obj.data.loading_img;
|
||||
$done({
|
||||
body: JSON.stringify(obj),
|
||||
});
|
||||
}
|
Loading…
Reference in New Issue