From 36a63d7d265123ffaf86d964df6b7a35bbc364f3 Mon Sep 17 00:00:00 2001 From: blackmatrix7 <27717518+blackmatrix7@users.noreply.github.com> Date: Fri, 8 Oct 2021 14:42:19 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=BC=80=E5=B1=8F=E5=8E=BB=E5=B9=BF=E5=91=8A]?= =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=A4=9A=E7=82=B9=E5=8E=BB=E5=B9=BF=E5=91=8A?= =?UTF-8?q?=E7=9A=84=E5=AE=A2=E6=88=B7=E7=AB=AF=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/startup/startup.js | 26 +++++++++++++------------- script/startup/startup.lnplugin | 3 ++- script/startup/startup.qxrewrite | 2 +- script/startup/startup.sgmodule | 3 ++- 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/script/startup/startup.js b/script/startup/startup.js index d9be295c1..8073b166d 100644 --- a/script/startup/startup.js +++ b/script/startup/startup.js @@ -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; diff --git a/script/startup/startup.lnplugin b/script/startup/startup.lnplugin index 8429fd7b3..042eef93d 100644 --- a/script/startup/startup.lnplugin +++ b/script/startup/startup.lnplugin @@ -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 \ No newline at end of file +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 \ No newline at end of file diff --git a/script/startup/startup.qxrewrite b/script/startup/startup.qxrewrite index d22e303cd..f360a6e97 100644 --- a/script/startup/startup.qxrewrite +++ b/script/startup/startup.qxrewrite @@ -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 diff --git a/script/startup/startup.sgmodule b/script/startup/startup.sgmodule index 5821c59d3..3307e2ab6 100644 --- a/script/startup/startup.sgmodule +++ b/script/startup/startup.sgmodule @@ -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 \ No newline at end of file +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 \ No newline at end of file