Reddit 过滤推广, 关 NSFW 提示(JQ 版)先测测 晚点传文件再同步到
Surge.qingr.moe支持 Surge 和 Loon
1. Surge 需此订阅功能
Body Rewrite 支持使用 JQ 表达式对 JSON 进行操作🆕 以后仅更新此
📦 远程模块 将收录到
LoonKissSurge Repository
[General]
force-http-engine-hosts = %APPEND% gql.reddit.com, gql-fed.reddit.com
[MITM]
hostname = %APPEND%, gql.reddit.com, gql-fed.reddit.com
[Body Rewrite]
http-response-jq ^https?:\/\/gql(-fed)?\.reddit\.com 'walk( if type == "object" then (if .isNsfw == true then .isNsfw = false else . end) | (if .isNsfwMediaBlocked == true then .isNsfwMediaBlocked = false else . end) | (if .isNsfwContentShown == false then .isNsfwContentShown = true else . end) | (if (.commentsPageAds | type == "array") then (.commentsPageAds = []) else . end) | (if ( (.node | type == "object") and (.node.cells | type == "array") and (.node.cells | any(.__typename? == "AdMetadataCell" or .isAdPost? == true)) ) then empty else . end) | (if (.node | type == "object") and (.node.adPayload | type == "object") then empty else . end) | (if .__typename == "AdPost" then empty else . end) else . end)'
2. Loon 需最新 TestFlight 版(现在好像会崩溃...等待确认)
[Rewrite]
^https?:\/\/gql(-fed)?\.reddit\.com response-body-json-jq 'walk( if type == "object" then (if .isNsfw == true then .isNsfw = false else . end) | (if .isNsfwMediaBlocked == true then .isNsfwMediaBlocked = false else . end) | (if .isNsfwContentShown == false then .isNsfwContentShown = true else . end) | (if (.commentsPageAds | type == "array") then (.commentsPageAds = []) else . end) | (if ( (.node | type == "object") and (.node.cells | type == "array") and (.node.cells | any(.__typename? == "AdMetadataCell" or .isAdPost? == true)) ) then empty else . end) | (if (.node | type == "object") and (.node.adPayload | type == "object") then empty else . end) | (if .__typename == "AdPost" then empty else . end) else . end)'
[MitM]
hostname = gql.reddit.com, gql-fed.reddit.com
#Surge #Loon #模块 #Reddit #去广告 #广告 #JQ