From eb925eb67b57f75decca8a2ecce4970c3c8f2480 Mon Sep 17 00:00:00 2001 From: Demo Date: Wed, 10 May 2023 20:20:20 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=BA=20feat:=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=8F=8A=E4=BC=98=E5=8C=96=E9=AB=98=E5=BE=B7=E5=9C=B0=E5=9B=BE?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rewrite/AdBlock/Amap.adblock | 32 ++++++++++++-------------- Scripts/AdBlock/Other/Amap.js | 37 +++++++++++++++++-------------- Scripts/AdBlock/Other/Amap.min.js | 19 ++++++++++++++++ Scripts/AdBlock/Other/Amdc.js | 21 ++++++++++++++++++ Scripts/AdBlock/Other/Amdc.min.js | 16 +++++++++++++ 5 files changed, 90 insertions(+), 35 deletions(-) create mode 100644 Scripts/AdBlock/Other/Amap.min.js create mode 100644 Scripts/AdBlock/Other/Amdc.js create mode 100644 Scripts/AdBlock/Other/Amdc.min.js diff --git a/Rewrite/AdBlock/Amap.adblock b/Rewrite/AdBlock/Amap.adblock index 73da76f..08067b3 100644 --- a/Rewrite/AdBlock/Amap.adblock +++ b/Rewrite/AdBlock/Amap.adblock @@ -1,16 +1,16 @@ // ==UserScript== -// @ScriptName 高德地图☆净化 +// @ScriptName 高德地图净化[墨鱼版] // @Author @ddgksf2013 // @ForHelp 若有屏蔽广告的需求,可公众号后台回复APP名称 // @WechatID 公众号墨鱼手记 // @TgChannel https://t.me/ddgksf2021 // @Contribute https://t.me/ddgksf2013_bot // @Feedback 📮 ddgksf2013@163.com 📮 -// @UpdateTime 2023-02-08 +// @UpdateTime 2023-04-25 // @Suitable 自行观看“# > ”注释内容 // @Attention 使用前请卸载高德地图,挂载脚本然后使用 // @Attention 如需引用请注明出处,谢谢合作! -// @Version V1.0.19 +// @Version V1.0.22 // @ScriptURL https://github.com/ddgksf2013/Rewrite/raw/master/AdBlock/Amap.conf // ==/UserScript== @@ -18,39 +18,35 @@ hostname=*.amap.com -# > 高德地图_请自行添加本地分流@ddgksf2013 -;host, amdc.m.taobao.com, reject - - +# > 高德地图_amdc处理[Anti已将Amdc分流删除,故更换屏蔽策略]@ddgksf2013 +^http:\/\/amdc\.m\.taobao\.com url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/Amdc.min.js # > 高德地图_底部tab栏角标@ddgksf2013 -^https?:\/\/.*\.amap\.com\/ws\/message\/notice\/list url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/Amap.js +^https?:\/\/.*\.amap\.com\/ws\/message\/notice\/list url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/Amap.min.js # > 高德地图_路线规划下方广告@ddgksf2013 ^https?:\/\/.*\.amap\.com\/ws\/faas\/amap-navigation\/card-service-route-plan\? url reject-dict # > 高德地图_首页右中广告@ddgksf2013 -^https?:\/\/.*\.amap\.com\/ws\/shield\/frogserver\/aocs\/updatable url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/Amap.js +^https?:\/\/.*\.amap\.com\/ws\/shield\/frogserver\/aocs\/updatable url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/Amap.min.js # > 高德地图_附近页面@ddgksf2013 -^https?:\/\/.*\.amap\.com\/ws\/shield\/search\/nearbyrec_smart url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/Amap.js +^https?:\/\/.*\.amap\.com\/ws\/shield\/search\/nearbyrec_smart url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/Amap.min.js # > 高德地图_打车页面处理@ddgksf2013 -^https?:\/\/.*\.amap\.com\/ws\/promotion-web\/resource url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/Amap.js +^https?:\/\/.*\.amap\.com\/ws\/promotion-web\/resource url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/Amap.min.js # > 高德地图_Tip请求@ddgksf2013 ^https?:\/\/.*\.amap\.com\/ws\/boss\/order_web\/\w{8}_information url reject-200 # > 高德地图_首页底部处理@ddgksf2013 -^https?:\/\/.*\.amap\.com\/ws\/faas\/amap-navigation\/main-page url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/Amap.js +^https?:\/\/.*\.amap\.com\/ws\/faas\/amap-navigation\/main-page url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/Amap.min.js # > 高德地图_通用广告请求@ddgksf2013 ^https?:\/\/.*\.amap\.com\/ws\/asa\/ads_attribution url reject # > 高德地图_开屏广告@ddgksf2013 -^https?:\/\/.*\.amap\.com\/ws\/valueadded\/alimama\/splash_screen url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/Amap.js +^https?:\/\/.*\.amap\.com\/ws\/valueadded\/alimama\/splash_screen url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/Amap.min.js # > 高德地图_首页顶部推广@ddgksf2013 -^https?:\/\/.*\.amap\.com\/ws\/msgbox\/pull url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/Amap.js +^https?:\/\/.*\.amap\.com\/ws\/msgbox\/pull url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/Amap.min.js # > 高德地图_我的页面@ddgksf2013 -^https?:\/\/.*\.amap\.com\/ws\/shield\/dsp\/profile\/index\/nodefaas url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/Amap.js +^https?:\/\/.*\.amap\.com\/ws\/shield\/dsp\/profile\/index\/nodefaas url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/Amap.min.js # > 高德地图_搜索框热词@ddgksf2013 -^https?:\/\/.*\.amap\.com\/ws\/shield\/search\/new_hotword url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/Amap.js +^https?:\/\/.*\.amap\.com\/ws\/shield\/search\/new_hotword url script-response-body https://cdn.jsdelivr.net/gh/sve1r/Rules-For-Quantumult-X@develop/Scripts/AdBlock/Other/Amap.min.js # > 高德地图_搜索框scene@ddgksf2013 ^https?:\/\/.*\.amap\.com\/ws\/shield\/scene\/recommend url reject-dict # > 高德地图_首页左上角gif@ddgksf2013 ^https?:\/\/.*\.amap\.com\/uploadimg\/\w+\.gif url reject-img -# > 高德地图_首页右中'2022出行报告'[已从根本上解决]@ddgksf2013 -;^https?:\/\/img\.alicdn\.com\/imgextra\/i1\/O1CN01z5u64r1EdKvtRa19q_!!6000000000374-2-tps-120-120\.png # > 高德地图_左下天气@ddgksf2013 ^https?:\/\/.*\.amap\.com\/ws\/valueadded\/weather url reject-dict \ No newline at end of file diff --git a/Scripts/AdBlock/Other/Amap.js b/Scripts/AdBlock/Other/Amap.js index 4280587..5e4fe70 100644 --- a/Scripts/AdBlock/Other/Amap.js +++ b/Scripts/AdBlock/Other/Amap.js @@ -2,14 +2,14 @@ > 应用名称:墨鱼自用高德地图去广告脚本 > 脚本作者:@ddgksf2013 > 微信账号:墨鱼手记 -> 更新时间:2022-01-26 +> 更新时间:2022-04-25 > 通知频道:https://t.me/ddgksf2021 > 贡献投稿:https://t.me/ddgksf2013_bot > 问题反馈:ddgksf2013@163.com > 特别提醒:如需转载请注明出处,谢谢合作! ***********************************************/ -const version = "V1.0.24"; +const version = "V1.0.28"; var obj = JSON.parse($response.body); if (-1 != $request.url.indexOf("valueadded/alimama/splash_screen")) { @@ -25,6 +25,7 @@ if (-1 != $request.url.indexOf("valueadded/alimama/splash_screen")) { (a) => "LoginCard" == a.dataType )), obj.data?.pull3?.msgs && (obj.data.pull3.msgs = []), + obj.data?.business_position && (obj.data.business_position = []), obj.data?.mapBizList && (obj.data.mapBizList = []), $done({ body: JSON.stringify(obj) }); else if (-1 != $request.url.indexOf("profile/index/node")) @@ -38,30 +39,32 @@ else if (-1 != $request.url.indexOf("new_hotword")) obj.data?.header_hotword && (obj.data.header_hotword = []), $done({ body: JSON.stringify(obj) }); else if (-1 != $request.url.indexOf("ws/promotion-web/resource")) { - let o = ["icon", "banner", "tips", "popup", "bubble"]; - for (let e of o) obj.data?.[e] && (obj.data[e] = []); + let e = ["icon", "banner", "tips", "popup", "bubble"]; + for (let o of e) obj.data?.[o] && (obj.data[o] = []); $done({ body: JSON.stringify(obj) }); } else if (-1 != $request.url.indexOf("ws/msgbox/pull")) obj.msgs && (obj.msgs = []), obj.pull3?.msgs && (obj.pull3.msgs = []), $done({ body: JSON.stringify(obj) }); -else if (-1 != $request.url.indexOf("ws/shield/frogserver/aocs")) - obj.data?.operation_layer && - (obj.data.operation_layer = { status: 1, version: "", value: "" }), - obj.data?.home_business_position_config && - (obj.data.home_business_position_config = { - status: 1, - version: "", - value: "", - }), +else if (-1 != $request.url.indexOf("ws/message/notice/list")) + obj.data?.noticeList && (obj.data.noticeList = []), $done({ body: JSON.stringify(obj) }); -else if (-1 != $request.url.indexOf("search/nearbyrec_smart")) { - let t = ["coupon", "scene", "activity", "commodity_rec"]; +else if (-1 != $request.url.indexOf("ws/shield/frogserver/aocs")) { + for (let t of [ + "gd_notch_logo", + "home_business_position_config", + "his_input_tip", + "operation_layer", + ]) + obj.data?.[t] && (obj.data[t] = { status: 1, version: "", value: "" }); + $done({ body: JSON.stringify(obj) }); +} else if (-1 != $request.url.indexOf("search/nearbyrec_smart")) { + let i = ["coupon", "scene", "activity", "commodity_rec"]; obj.data && - (t.forEach((a) => { + (i.forEach((a) => { delete obj.data[a]; }), obj.data.modules && - (obj.data.modules = obj.data.modules.filter((a) => !t.includes(a)))), + (obj.data.modules = obj.data.modules.filter((a) => !i.includes(a)))), $done({ body: JSON.stringify(obj) }); } else $done({}); diff --git a/Scripts/AdBlock/Other/Amap.min.js b/Scripts/AdBlock/Other/Amap.min.js new file mode 100644 index 0000000..da5bd79 --- /dev/null +++ b/Scripts/AdBlock/Other/Amap.min.js @@ -0,0 +1,19 @@ +/*********************************************** +> 应用名称:墨鱼自用高德地图去广告脚本 +> 脚本作者:@ddgksf2013 +> 微信账号:墨鱼手记 +> 更新时间:2022-04-25 +> 通知频道:https://t.me/ddgksf2021 +> 贡献投稿:https://t.me/ddgksf2013_bot +> 问题反馈:ddgksf2013@163.com +> 特别提醒:如需转载请注明出处,谢谢合作! +***********************************************/ + + + + + +const version = 'V1.0.28'; + + +var obj=JSON.parse($response.body);if(-1!=$request.url.indexOf("valueadded/alimama/splash_screen")){if(obj.data&&obj.data.ad)for(let a of obj.data.ad)a.set.setting.display_time=0,a.creative[0].start_time=2240150400,a.creative[0].end_time=2240150400;$done({body:JSON.stringify(obj)})}else if(-1!=$request.url.indexOf("faas/amap-navigation/main-page"))obj.data?.cardList&&(obj.data.cardList=Object.values(obj.data.cardList).filter(a=>"LoginCard"==a.dataType)),obj.data?.pull3?.msgs&&(obj.data.pull3.msgs=[]),obj.data?.business_position&&(obj.data.business_position=[]),obj.data?.mapBizList&&(obj.data.mapBizList=[]),$done({body:JSON.stringify(obj)});else if(-1!=$request.url.indexOf("profile/index/node"))delete obj.data.tipData,obj.data?.cardList&&(obj.data.cardList=Object.values(obj.data.cardList).filter(a=>"MyOrderCard"==a.dataType||"GdRecommendCard"==a.dataType)),$done({body:JSON.stringify(obj)});else if(-1!=$request.url.indexOf("new_hotword"))obj.data?.header_hotword&&(obj.data.header_hotword=[]),$done({body:JSON.stringify(obj)});else if(-1!=$request.url.indexOf("ws/promotion-web/resource")){let e=["icon","banner","tips","popup","bubble"];for(let o of e)obj.data?.[o]&&(obj.data[o]=[]);$done({body:JSON.stringify(obj)})}else if(-1!=$request.url.indexOf("ws/msgbox/pull"))obj.msgs&&(obj.msgs=[]),obj.pull3?.msgs&&(obj.pull3.msgs=[]),$done({body:JSON.stringify(obj)});else if(-1!=$request.url.indexOf("ws/message/notice/list"))obj.data?.noticeList&&(obj.data.noticeList=[]),$done({body:JSON.stringify(obj)});else if(-1!=$request.url.indexOf("ws/shield/frogserver/aocs")){for(let t of["gd_notch_logo","home_business_position_config","his_input_tip","operation_layer"])obj.data?.[t]&&(obj.data[t]={status:1,version:"",value:""});$done({body:JSON.stringify(obj)})}else if(-1!=$request.url.indexOf("search/nearbyrec_smart")){let i=["coupon","scene","activity","commodity_rec"];obj.data&&(i.forEach(a=>{delete obj.data[a]}),obj.data.modules&&(obj.data.modules=obj.data.modules.filter(a=>!i.includes(a)))),$done({body:JSON.stringify(obj)})}else $done({}); \ No newline at end of file diff --git a/Scripts/AdBlock/Other/Amdc.js b/Scripts/AdBlock/Other/Amdc.js new file mode 100644 index 0000000..b6baa97 --- /dev/null +++ b/Scripts/AdBlock/Other/Amdc.js @@ -0,0 +1,21 @@ +/*********************************************** +> 应用名称:墨鱼自用amdc脚本 +> 脚本作者:@ddgksf2013 +> 微信账号:墨鱼手记 +> 更新时间:2022-04-25 +> 通知频道:https://t.me/ddgksf2021 +> 贡献投稿:https://t.me/ddgksf2013_bot +> 问题反馈:ddgksf2013@163.com +> 特别提醒:如需转载请注明出处,谢谢合作! +***********************************************/ + +//使用AMDC的APP有:咸鱼、淘宝、盒马、高德、菜鸟、飞猪 + +const version = "V1.0.4"; + +var ua = $request.headers["User-Agent"] || $request.headers["user-agent"]; +-1 != ua.indexOf("AMap") || +-1 != ua.indexOf("Cainiao") || +-1 != ua.indexOf("%E9%A3%9E%E7%8C%AA%E6%97%85%E8%A1%8C") + ? $done({ body: "empty" }) + : $done({}); diff --git a/Scripts/AdBlock/Other/Amdc.min.js b/Scripts/AdBlock/Other/Amdc.min.js new file mode 100644 index 0000000..61a09fb --- /dev/null +++ b/Scripts/AdBlock/Other/Amdc.min.js @@ -0,0 +1,16 @@ +/*********************************************** +> 应用名称:墨鱼自用amdc脚本 +> 脚本作者:@ddgksf2013 +> 微信账号:墨鱼手记 +> 更新时间:2022-04-25 +> 通知频道:https://t.me/ddgksf2021 +> 贡献投稿:https://t.me/ddgksf2013_bot +> 问题反馈:ddgksf2013@163.com +> 特别提醒:如需转载请注明出处,谢谢合作! +***********************************************/ + +//使用AMDC的APP有:咸鱼、淘宝、盒马、高德、菜鸟、飞猪 + +const version = 'V1.0.4'; + +var ua=$request.headers["User-Agent"]||$request.headers["user-agent"];-1!=ua.indexOf("AMap")||-1!=ua.indexOf("Cainiao")||-1!=ua.indexOf("%E9%A3%9E%E7%8C%AA%E6%97%85%E8%A1%8C")?$done({body:"empty"}):$done({}); \ No newline at end of file