mirror of
https://github.com/Giu-zhao/ios_rule_script
synced 2024-11-26 02:18:26 +08:00
[知乎助手] 适配知乎 8.25.1(10218) 版本
This commit is contained in:
parent
d229629589
commit
1f923ba512
@ -139,7 +139,7 @@ Lite版本请确保所有Plus版本的选项都为关闭状态,以减少不必
|
|||||||
使用模块
|
使用模块
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/zhihu/zhihu_plus.sgmodule
|
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zhihu/zhihu_plus.sgmodule
|
||||||
```
|
```
|
||||||
|
|
||||||
### Loon
|
### Loon
|
||||||
@ -148,7 +148,7 @@ https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/zhihu/zhih
|
|||||||
|
|
||||||
```ini
|
```ini
|
||||||
[Plugin]
|
[Plugin]
|
||||||
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/zhihu/zhihu_plus.lnplugin, tag=知乎助手_去广告及体验增强, enabled=true
|
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zhihu/zhihu_plus.lnplugin, tag=知乎助手_去广告及体验增强, enabled=true
|
||||||
```
|
```
|
||||||
|
|
||||||
### Quantumult X
|
### Quantumult X
|
||||||
@ -167,7 +167,7 @@ HOST,sugar.zhihu.com,reject
|
|||||||
USER-AGENT,AVOS*,REJECT
|
USER-AGENT,AVOS*,REJECT
|
||||||
|
|
||||||
[rewrite_remote]
|
[rewrite_remote]
|
||||||
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/zhihu/zhihu_plus.qxrewrite, tag=知乎助手_去广告及体验增强, update-interval=86400, opt-parser=false, enabled=true
|
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zhihu/zhihu_plus.qxrewrite, tag=知乎助手_去广告及体验增强, update-interval=86400, opt-parser=false, enabled=true
|
||||||
```
|
```
|
||||||
|
|
||||||
## 配置说明(Lite)
|
## 配置说明(Lite)
|
||||||
@ -179,14 +179,14 @@ Plus版本功能较多,需要消耗较多的系统资源。如果出现VPN自
|
|||||||
使用模块
|
使用模块
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/zhihu/zhihu_lite.sgmodule
|
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zhihu/zhihu_lite.sgmodule
|
||||||
```
|
```
|
||||||
|
|
||||||
### Loon
|
### Loon
|
||||||
|
|
||||||
```ini
|
```ini
|
||||||
[Plugin]
|
[Plugin]
|
||||||
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/zhihu/zhihu_lite.lnplugin, tag=知乎助手_去广告, enabled=true
|
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zhihu/zhihu_lite.lnplugin, tag=知乎助手_去广告, enabled=true
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Quantumult X
|
#### Quantumult X
|
||||||
@ -206,7 +206,7 @@ HOST,sugar.zhihu.com,reject
|
|||||||
USER-AGENT,AVOS*,REJECT
|
USER-AGENT,AVOS*,REJECT
|
||||||
|
|
||||||
[rewrite_remote]
|
[rewrite_remote]
|
||||||
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/zhihu/zhihu_lite.qxrewrite, tag=知乎助手_去广告, update-interval=86400, opt-parser=false, enabled=true
|
https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zhihu/zhihu_lite.qxrewrite, tag=知乎助手_去广告, update-interval=86400, opt-parser=false, enabled=true
|
||||||
```
|
```
|
||||||
|
|
||||||
## 其他问题
|
## 其他问题
|
||||||
|
@ -21,7 +21,7 @@ let magicJS = MagicJS(scriptName, "INFO");
|
|||||||
response = modifyAnswer();
|
response = modifyAnswer();
|
||||||
break;
|
break;
|
||||||
// 处理登录用户信息
|
// 处理登录用户信息
|
||||||
case /^https:\/\/(api\.zhihu\.com|(103\.41\.167\.(226|234|235|236)))\/people\/self/.test(magicJS.request.url):
|
case /^https:\/\/(api\.zhihu\.com|(103\.41\.167\.(226|234|235|236)))\/people\/self$/.test(magicJS.request.url):
|
||||||
response = processUserInfo();
|
response = processUserInfo();
|
||||||
break;
|
break;
|
||||||
// 黑名单增强 - 浏览黑名单用户信息时自动加入脚本黑名单
|
// 黑名单增强 - 浏览黑名单用户信息时自动加入脚本黑名单
|
||||||
@ -389,14 +389,16 @@ function removeHotListAds() {
|
|||||||
try {
|
try {
|
||||||
if (!!magicJS.response.body) {
|
if (!!magicJS.response.body) {
|
||||||
let obj = JSON.parse(magicJS.response.body);
|
let obj = JSON.parse(magicJS.response.body);
|
||||||
|
if ('data' in obj){
|
||||||
let data = obj["data"].filter((e) => {
|
let data = obj["data"].filter((e) => {
|
||||||
return e["type"] === "hot_list_feed" || e["type"] === "hot_list_feed_video";
|
return e["type"] === "hot_list_feed" || e["type"] === "hot_list_feed_video";
|
||||||
});
|
});
|
||||||
obj["data"] = data;
|
obj["data"] = data;
|
||||||
|
}
|
||||||
response = { body: JSON.stringify(obj) };
|
response = { body: JSON.stringify(obj) };
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
magicJS.logError(`去除知乎热搜广告出现异常:${err}`);
|
magicJS.logError(`去除知乎热榜广告出现异常:${err}`);
|
||||||
}
|
}
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
@ -572,6 +574,8 @@ function removeQuestionsAds() {
|
|||||||
magicJS.logDebug(`当前黑名单列表: ${JSON.stringify(customBlockedUsers)}`);
|
magicJS.logDebug(`当前黑名单列表: ${JSON.stringify(customBlockedUsers)}`);
|
||||||
delete obj["ad_info"];
|
delete obj["ad_info"];
|
||||||
delete obj["roundtable_info"];
|
delete obj["roundtable_info"];
|
||||||
|
// 去除回答列表中的黑名单用户
|
||||||
|
if ('data' in obj){
|
||||||
let data = obj["data"].filter((element) => {
|
let data = obj["data"].filter((element) => {
|
||||||
let blackUserName = "";
|
let blackUserName = "";
|
||||||
try{
|
try{
|
||||||
@ -588,6 +592,7 @@ function removeQuestionsAds() {
|
|||||||
return blackUserName == "" || !customBlockedUsers[blackUserName];
|
return blackUserName == "" || !customBlockedUsers[blackUserName];
|
||||||
});
|
});
|
||||||
obj["data"] = data;
|
obj["data"] = data;
|
||||||
|
}
|
||||||
let body = JSON.stringify(obj);
|
let body = JSON.stringify(obj);
|
||||||
magicJS.logDebug(`修改后的回答列表数据:${body}`);
|
magicJS.logDebug(`修改后的回答列表数据:${body}`);
|
||||||
response = { body: body };
|
response = { body: body };
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
[Rule]
|
[Rule]
|
||||||
# 知乎广告拦截
|
# 知乎广告拦截
|
||||||
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/zhihu/zhihu_remove_ads.list,REJECT-NO-DROP
|
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zhihu/zhihu_remove_ads.list,REJECT-NO-DROP
|
||||||
|
|
||||||
[Map Local]
|
[Map Local]
|
||||||
# 知乎其他广告拦截
|
# 知乎其他广告拦截
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
# 屏蔽知乎8.3.0版本首页顶部的视频角标
|
# 屏蔽知乎8.3.0版本首页顶部的视频角标
|
||||||
URL-REGEX,^https?:\/\/(api\.zhihu\.com|(103\.41\.167\.(226|234|235|236)))\/explore\/entry\/tips,REJECT-TINYGIF
|
URL-REGEX,^https?:\/\/(api\.zhihu\.com|(103\.41\.167\.(226|234|235|236)))\/explore\/entry\/tips,REJECT-TINYGIF
|
||||||
# 知乎广告拦截
|
# 知乎广告拦截
|
||||||
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/zhihu/zhihu_remove_ads.list,REJECT-NO-DROP
|
RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/zhihu/zhihu_remove_ads.list,REJECT-NO-DROP
|
||||||
|
|
||||||
|
|
||||||
[URL Rewrite]
|
[URL Rewrite]
|
||||||
@ -14,7 +14,7 @@ RULE-SET,https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/z
|
|||||||
|
|
||||||
[Map Local]
|
[Map Local]
|
||||||
# 屏蔽知乎下发的配置,如皮肤等
|
# 屏蔽知乎下发的配置,如皮肤等
|
||||||
^https?:\/\/(api\.zhihu\.com|(103\.41\.167\.(226|234|235|236)))\/ab\/api\/v1\/products\/zhihu\/platforms\/ios\/config data="https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/blank/blank" header="Content-Type: application/x-protobuf"
|
^https?:\/\/(api\.zhihu\.com|(103\.41\.167\.(226|234|235|236)))\/ab\/api\/v1\/products\/zhihu\/platforms\/ios\/config data="https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/blank/blank_dict.json" header="Content-Type: application/x-protobuf"
|
||||||
# 知乎去除Tab页关注人头像
|
# 知乎去除Tab页关注人头像
|
||||||
^https?:\/\/(api\.zhihu\.com|(103\.41\.167\.(226|234|235|236)))\/moments\/tab_v2 data="https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/blank/blank_dict.json"
|
^https?:\/\/(api\.zhihu\.com|(103\.41\.167\.(226|234|235|236)))\/moments\/tab_v2 data="https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/blank/blank_dict.json"
|
||||||
# 知乎去除最常访问
|
# 知乎去除最常访问
|
||||||
|
Loading…
Reference in New Issue
Block a user