多点开屏广告 (#410)

* Update startup.js
This commit is contained in:
Junxun Yin 2021-10-05 19:57:21 +08:00 committed by blackmatrix7
parent 2381e2ed56
commit 79197090ad
3 changed files with 18 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,19 @@ 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 {

View File

@ -12,5 +12,7 @@
^https?:\/\/api\.m\.jd\.com\/client\.action\?functionId=start url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js
# 联享家
^https?:\/\/mi\.gdt\.qq\.com\/gdt_mview.fcg url script-response-body https://raw.githubusercontent.com/blackmatrix7/ios_rule_script/master/script/startup/startup.js
# 多点
^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 = 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 = 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