mirror of
https://github.com/Giu-zhao/ios_rule_script
synced 2024-11-22 08:28:25 +08:00
[开屏去广告]完善多点去广告的客户端支持
This commit is contained in:
parent
871d14f749
commit
36a63d7d26
@ -5,19 +5,6 @@ let magicJS = MagicJS(scriptName, "INFO");
|
||||
let response = null;
|
||||
if (magicJS.isResponse) {
|
||||
switch (true) {
|
||||
// 多点
|
||||
case /^https?:\/\/cmsapi\.dmall\.com\/app\/home\/homepageStartUpPic/.test(magicJS.request.url):
|
||||
try {
|
||||
let obj = JSON.parse(magicJS.response.body);
|
||||
for (let i = 0; i < obj["data"]["welcomePage"].length; i++) {
|
||||
obj["data"]["welcomePage"][i]["onlineTime"] = 1915027200000;
|
||||
obj["data"]["welcomePage"][i]["offlineTime"] = 1924272000000;
|
||||
}
|
||||
response = { body: JSON.stringify(obj) };
|
||||
} catch (err) {
|
||||
magicJS.logError(`开屏广告处理出现异常:${err}`);
|
||||
}
|
||||
break;
|
||||
// 嘀嗒出行
|
||||
case /^https?:\/\/capis(-?\w*)?\.didapinche\.com\/ad\/cx\/startup\?/.test(magicJS.request.url):
|
||||
try {
|
||||
@ -103,6 +90,19 @@ let magicJS = MagicJS(scriptName, "INFO");
|
||||
magicJS.logError(`联享家开屏去广告出现异常:${err}`);
|
||||
}
|
||||
break;
|
||||
// 多点
|
||||
case /^https?:\/\/cmsapi\.dmall\.com\/app\/home\/homepageStartUpPic/.test(magicJS.request.url):
|
||||
try {
|
||||
let obj = JSON.parse(magicJS.response.body);
|
||||
for (let i = 0; i < obj["data"]["welcomePage"].length; i++) {
|
||||
obj["data"]["welcomePage"][i]["onlineTime"] = 1915027200000;
|
||||
obj["data"]["welcomePage"][i]["offlineTime"] = 1924272000000;
|
||||
}
|
||||
response = { body: JSON.stringify(obj) };
|
||||
} catch (err) {
|
||||
magicJS.logError(`多点开屏广告处理出现异常:${err}`);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
magicJS.logWarning("触发意外的请求处理,请确认脚本或复写配置正常。");
|
||||
break;
|
||||
|
@ -8,6 +8,7 @@ http-response ^https?:\/\/wmapi\.meituan\.com\/api\/v\d+\/loadInfo? requires-bod
|
||||
http-response ^https?:\/\/hd\.mina\.mi\.com\/splashscreen\/alert requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js,tag=小爱音箱_开屏去广告
|
||||
http-response ^https?:\/\/hd\.mina\.mi\.com\/splashscreen\/alert requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js,tag=京东_开屏去广告
|
||||
http-response ^https?:\/\/mi\.gdt\.qq\.com\/gdt_mview.fcg requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js,tag=联享家_开屏去广告
|
||||
http-response ^https?:\/\/cmsapi\.dmall\.com\/app\/home\/homepageStartUpPic requires-body=1,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js,tag=多点_开屏去广告
|
||||
|
||||
[MITM]
|
||||
hostname = capis.didapinche.com,capis*.didapinche.com,fmapp.chinafamilymart.com.cn,app.bilibili.com,wmapi.meituan.com,hd.mina.mi.com,api.m.jd.com,mi.gdt.qq.com
|
||||
hostname = capis.didapinche.com,capis*.didapinche.com,fmapp.chinafamilymart.com.cn,app.bilibili.com,wmapi.meituan.com,hd.mina.mi.com,api.m.jd.com,mi.gdt.qq.com,cmsapi.dmall.com
|
@ -15,4 +15,4 @@
|
||||
# 多点
|
||||
^https?:\/\/cmsapi\.dmall\.com\/app\/home\/homepageStartUpPic url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js
|
||||
|
||||
hostname = cmsapi.dmall.com,capis.didapinche.com,capis*.didapinche.com,fmapp.chinafamilymart.com.cn,app.bilibili.com,wmapi.meituan.com,hd.mina.mi.com,api.m.jd.com,mi.gdt.qq.com
|
||||
hostname = capis.didapinche.com,capis*.didapinche.com,fmapp.chinafamilymart.com.cn,app.bilibili.com,wmapi.meituan.com,hd.mina.mi.com,api.m.jd.com,mi.gdt.qq.com,cmsapi.dmall.com
|
||||
|
@ -10,6 +10,7 @@ BiliBili_开屏去广告 = type=http-response,requires-body=1,max-size=0,pattern
|
||||
小爱音箱_开屏去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/hd\.mina\.mi\.com\/splashscreen\/alert,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js
|
||||
京东_开屏去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/api\.m\.jd\.com\/client\.action\?functionId=start,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js
|
||||
联享家_开屏去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/mi\.gdt\.qq\.com\/gdt_mview.fcg,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js
|
||||
多点_开屏去广告 = type=http-response,requires-body=1,max-size=0,pattern=^https?:\/\/cmsapi\.dmall\.com\/app\/home\/homepageStartUpPic,script-path=https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js
|
||||
|
||||
[MITM]
|
||||
hostname = %APPEND% capis.didapinche.com,capis*.didapinche.com,fmapp.chinafamilymart.com.cn,app.bilibili.com,wmapi.meituan.com,hd.mina.mi.com,api.m.jd.com,mi.gdt.qq.com
|
||||
hostname = %APPEND% capis.didapinche.com,capis*.didapinche.com,fmapp.chinafamilymart.com.cn,app.bilibili.com,wmapi.meituan.com,hd.mina.mi.com,api.m.jd.com,mi.gdt.qq.com,cmsapi.dmall.com
|
Loading…
Reference in New Issue
Block a user