From 7ef2dda7d2e03e20af2006a3631e0b5caed3cc2c Mon Sep 17 00:00:00 2001 From: aoguai <34203474+aoguai@users.noreply.github.com> Date: Sun, 23 Jun 2024 21:33:55 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=A7=84=E5=88=99=E7=BB=B4=E6=8A=A4?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=20(#182)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(QQ): 消息页面顶部广告, 自动授权 * feat(高德地图): 首页广告卡片 * feat(大学搜题酱): 信息流广告 * feat(阿里云盘): 自动签到 * feat(QQ音乐): 移除全局规则覆盖的规则 * feat(淘宝): 弹窗广告 * feat(菜鸟): 包裹页面广告 * feat(微信): 小程序部分广告 * chore(actions): check_format_lint --------- Co-authored-by: github-actions[bot] --- src/apps/com.alicloud.databox.ts | 2 + src/apps/com.autonavi.minimap.ts | 2 +- src/apps/com.cainiao.wireless.ts | 20 ++-- src/apps/com.taobao.taobao.ts | 156 ++++++++++++++-------------- src/apps/com.tencent.mm.ts | 51 ++++----- src/apps/com.tencent.mobileqq.ts | 24 +++-- src/apps/com.tencent.qqmusic.ts | 6 -- src/apps/com.zmzx.college.search.ts | 1 + 8 files changed, 127 insertions(+), 135 deletions(-) diff --git a/src/apps/com.alicloud.databox.ts b/src/apps/com.alicloud.databox.ts index 14bf087fa..2fe59d2d5 100644 --- a/src/apps/com.alicloud.databox.ts +++ b/src/apps/com.alicloud.databox.ts @@ -15,6 +15,7 @@ export default defineGkdApp({ activityIds: [ 'com.alicloud.databox.MainActivity', 'com.alicloud.databox.navigation.NavigationFragmentContainerActivity', + 'com.alicloud.databox.account.login.LoginActivity', ], rules: [ { @@ -24,6 +25,7 @@ export default defineGkdApp({ snapshotUrls: [ 'https://i.gkd.li/import/12929318', 'https://i.gkd.li/i/15573070', + 'https://i.gkd.li/i/15942837', ], }, { diff --git a/src/apps/com.autonavi.minimap.ts b/src/apps/com.autonavi.minimap.ts index 7194d0471..ea3245481 100644 --- a/src/apps/com.autonavi.minimap.ts +++ b/src/apps/com.autonavi.minimap.ts @@ -30,7 +30,7 @@ export default defineGkdApp({ desc: '关闭首页的所有可关闭的广告卡片', activityIds: 'com.autonavi.map.activity.NewMapActivity', rules: - 'ScrollView >n ViewGroup[childCount<5][visibleToUser=true] > ViewGroup[childCount>0] + @ViewGroup[index!=0][childCount=1][visibleToUser=true][clickable=true][desc=null||desc="关闭"] > ImageView[visibleToUser=true][desc=null||desc="关闭"]', + 'ScrollView >n ViewGroup[childCount<5][visibleToUser=true] > ViewGroup[childCount>0] + ViewGroup[index!=0][childCount=1][visibleToUser=true][clickable=true][desc=null||desc="关闭"] > ImageView[visibleToUser=true][desc=null||desc="关闭"]', snapshotUrls: [ 'https://i.gkd.li/import/12642842', 'https://i.gkd.li/import/12642845', diff --git a/src/apps/com.cainiao.wireless.ts b/src/apps/com.cainiao.wireless.ts index 018c85614..33ed5aa5f 100644 --- a/src/apps/com.cainiao.wireless.ts +++ b/src/apps/com.cainiao.wireless.ts @@ -44,21 +44,21 @@ export default defineGkdApp({ }, { key: 2, - name: '局部广告-包裹页面-地图底部横条广告', + name: '局部广告-包裹页面广告', activityIds: [ 'com.taobao.cainiao.logistic.ui.view.LogisticDetailActivity', ], - rules: 'View[desc="立即查看"] +2 ImageView[id=null]', - snapshotUrls: ['https://i.gkd.li/import/14162159'], - }, - { - key: 3, - name: '局部广告-包裹页面-物流信息底部横条广告', - desc: '点击右上角关闭', - quickFind: true, - activityIds: 'com.taobao.cainiao.logistic.ui.view.LogisticDetailActivity', rules: [ { + key: 0, + name: '地图底部横条广告', + matches: 'View[desc="立即查看"] +2 ImageView[id=null]', + snapshotUrls: 'https://i.gkd.li/import/14162159', + }, + { + key: 1, + name: '物流信息底部横条广告', + quickFind: true, matches: '[vid="iv_banner_close"]', snapshotUrls: 'https://i.gkd.li/i/15879126', }, diff --git a/src/apps/com.taobao.taobao.ts b/src/apps/com.taobao.taobao.ts index 90649451b..95aef8aae 100644 --- a/src/apps/com.taobao.taobao.ts +++ b/src/apps/com.taobao.taobao.ts @@ -16,19 +16,20 @@ export default defineGkdApp({ { key: 1, name: '全屏广告-弹窗广告', + desc: '各种全屏广告弹窗', enable: false, - quickFind: true, - activityIds: [ - 'com.taobao.tao.welcome.Welcome', - 'com.taobao.tao.TBMainActivity', - 'com.taobao.android.tbabilitykit.pop.StdPopContainerActivity', - 'com.taobao.android.detail.wrapper.activity.DetailActivity', - 'com.alibaba.triver.container.TriverMainActivity', - ], rules: [ { key: 1, name: '88VIP开通优惠弹窗', + activityIds: [ + 'com.taobao.tao.welcome.Welcome', + 'com.taobao.tao.TBMainActivity', + 'com.taobao.android.tbabilitykit.pop.StdPopContainerActivity', + 'com.taobao.android.detail.wrapper.activity.DetailActivity', + 'com.alibaba.triver.container.TriverMainActivity', + ], + quickFind: true, matches: '@[desc="关闭按钮"] - [vid="poplayer_native_state_id"]', snapshotUrls: [ 'https://i.gkd.li/import/13198052', //com.taobao.tao.welcome.Welcome @@ -44,9 +45,76 @@ export default defineGkdApp({ { key: 2, name: '抢天降补贴弹窗', + activityIds: [ + 'com.taobao.tao.welcome.Welcome', + 'com.taobao.tao.TBMainActivity', + 'com.taobao.android.tbabilitykit.pop.StdPopContainerActivity', + 'com.taobao.android.detail.wrapper.activity.DetailActivity', + 'com.alibaba.triver.container.TriverMainActivity', + ], + quickFind: true, matches: '@[desc="关闭按钮"] - [vid="poplayer_native_state_id"]', snapshotUrls: 'https://i.gkd.li/import/14060521', }, + { + key: 3, + name: '"「0元下单」权益"弹窗', + activityIds: 'com.alipay.android.msp.ui.views.MspContainerActivity', + quickFind: true, + matches: + '[text="关闭"] < @FrameLayout[clickable=true] <3 FrameLayout[childCount=3] < * + FrameLayout[childCount=3] [text*="0元下单"]', + snapshotUrls: 'https://i.gkd.li/import/14155537', + }, + { + key: 4, + name: '视频页面-弹窗-类型1', + activityIds: [ + 'com.taobao.tao.welcome.Welcome', + 'com.taobao.tao.TBMainActivity', + ], + matches: + 'View[id=null] > [text="立即参加"] + TextView[id=null][clickable=true]', + snapshotUrls: 'https://i.gkd.li/import/12642813', + }, + { + key: 5, + name: '视频页面-签到弹窗', + activityIds: [ + 'com.taobao.tao.welcome.Welcome', + 'com.taobao.tao.TBMainActivity', + ], + matches: + '@Image[text.length>40] < View - View >n TextView[text*="立即"]', + snapshotUrls: [ + 'https://i.gkd.li/import/12642798', + 'https://i.gkd.li/import/14163734', + ], + }, + { + key: 6, + name: '将小组件添加到手机桌面', + activityIds: 'com.alibaba.triver.container.TriverMainActivity', + matches: + 'View[childCount=2] >3 View[text="立即添加"] + View[text="取消"]', + snapshotUrls: [ + 'https://i.gkd.li/import/13598578', + 'https://i.gkd.li/import/13853510', //误触快照 + ], + }, + { + key: 7, + name: '各级页面-添加到首页弹窗', + quickFind: true, + activityIds: [ + 'com.taobao.themis.container.app.TMSActivity', + 'com.alibaba.triver.container.TriverMainActivity', + ], + matches: 'TextView[text="去首页"] + TextView[text="退出"]', + snapshotUrls: [ + 'https://i.gkd.li/import/13197553', + 'https://i.gkd.li/import/13197546', + ], + }, ], }, { @@ -99,49 +167,6 @@ export default defineGkdApp({ 'https://i.gkd.li/i/15104645', ], }, - { - key: 9, - name: '局部广告-各级页面-添加到首页弹窗', - desc: '自动点击退出', - quickFind: true, - activityIds: [ - 'com.taobao.themis.container.app.TMSActivity', - 'com.alibaba.triver.container.TriverMainActivity', - ], - rules: 'TextView[text="去首页"] + TextView[text="退出"]', - snapshotUrls: [ - 'https://i.gkd.li/import/13197553', - 'https://i.gkd.li/import/13197546', - ], - }, - { - key: 10, - name: '全屏广告-视频页面-弹窗', - enable: false, - activityIds: [ - 'com.taobao.tao.welcome.Welcome', - 'com.taobao.tao.TBMainActivity', - ], - rules: [ - { - key: 0, - name: '类型1', - matches: - 'View[id=null] > [text="立即参加"] + TextView[id=null][clickable=true]', - snapshotUrls: 'https://i.gkd.li/import/12642813', - }, - { - key: 1, - name: '签到弹窗', - matches: - '@Image[text.length>40] < View - View >n TextView[text*="立即"]', - snapshotUrls: [ - 'https://i.gkd.li/import/12642798', - 'https://i.gkd.li/import/14163734', - ], - }, - ], - }, { key: 12, name: '更新提示', @@ -191,18 +216,6 @@ export default defineGkdApp({ }, ], }, - { - key: 14, - name: '全屏广告-将小组件添加到手机桌面', - desc: '点击取消', - enable: false, - activityIds: 'com.alibaba.triver.container.TriverMainActivity', - rules: 'View[childCount=2] >3 View[text="立即添加"] + View[text="取消"]', - snapshotUrls: [ - 'https://i.gkd.li/import/13598578', - 'https://i.gkd.li/import/13853510', //误触快照 - ], - }, { key: 16, name: '全屏广告-花呗升级报送征信', @@ -235,22 +248,5 @@ export default defineGkdApp({ }, ], }, - { - key: 18, - name: '全屏广告-"「0元下单」权益"弹窗', - desc: '点击关闭', - enable: false, - rules: [ - { - quickFind: true, - activityIds: 'com.alipay.android.msp.ui.views.MspContainerActivity', - matches: - '[text="关闭"] < @FrameLayout[clickable=true] <3 FrameLayout[childCount=3] < * + FrameLayout[childCount=3] [text*="0元下单"]', - exampleUrls: - 'https://m.gkd.li/57941037/a35c954d-5162-463c-aee3-b72b9c2d6625', - snapshotUrls: 'https://i.gkd.li/import/14155537', - }, - ], - }, ], }); diff --git a/src/apps/com.tencent.mm.ts b/src/apps/com.tencent.mm.ts index ef081b6f4..6d6fce43a 100644 --- a/src/apps/com.tencent.mm.ts +++ b/src/apps/com.tencent.mm.ts @@ -310,9 +310,8 @@ export default defineGkdApp({ }, { key: 10, - name: '全屏广告-微信小程序-开屏广告', + name: '全屏广告-小程序部分广告', enable: false, - quickFind: true, matchTime: 10000, activityIds: [ 'com.tencent.mm.plugin.appbrand.ui.AppBrandUI', @@ -320,7 +319,10 @@ export default defineGkdApp({ ], rules: [ { + key: 0, + name: '开屏广告', actionDelay: 800, // 过早点击首次大概率跳不过 + quickFind: true, matches: [ '[text="广告"][visibleToUser=true]', '[text="跳过"][visibleToUser=true]', @@ -336,28 +338,35 @@ export default defineGkdApp({ 'https://i.gkd.li/i/15108441', ], }, - ], - }, - { - key: 13, - name: '全屏广告-提瓦特助手小程序-弹窗广告', - enable: false, - activityIds: 'com.tencent.mm.plugin.appbrand.ui.AppBrandUI', - rules: [ { - key: 0, + key: 1, + name: '提瓦特助手小程序-弹窗广告1', matches: [ 'ImageView[childCount=0][visibleToUser=true] < FrameLayout < @FrameLayout[visibleToUser=true] <2 * - * >5 [text="查看详情"]', ], snapshotUrls: 'https://i.gkd.li/import/12926021', }, { - key: 1, + key: 2, + name: '提瓦特助手小程序-弹窗广告2', quickFind: true, matches: 'ImageView[childCount=0][visibleToUser=true] < FrameLayout < @FrameLayout[visibleToUser=true] <2 * - * >4 [text="广告"]', snapshotUrls: 'https://i.gkd.li/import/13459614', }, + { + key: 3, + name: '京东购物小程序-低价包邮广告', + actionDelay: 500, + actionMaximum: 1, + resetMatch: 'activity', + matches: + 'View[childCount=8] > View[index=6] > View[childCount=4] > Image[visibleToUser=true]', + snapshotUrls: [ + 'https://i.gkd.li/import/13298294', + 'https://i.gkd.li/import/14156176', // 误触快照 + ], + }, ], }, { @@ -401,24 +410,6 @@ export default defineGkdApp({ }, ], }, - { - key: 16, - name: '全屏广告-小程序-京东购物', - enable: false, - desc: '低价包邮广告', - actionDelay: 500, - actionMaximum: 1, - resetMatch: 'activity', - activityIds: 'com.tencent.mm.plugin.appbrand.ui.AppBrandUI', - rules: { - matches: - 'View[childCount=8] > View[index=6] > View[childCount=4] > Image[visibleToUser=true]', - snapshotUrls: [ - 'https://i.gkd.li/import/13298294', - 'https://i.gkd.li/import/14156176', // 误触快照 - ], - }, - }, { key: 18, name: '功能类-青少年模式自动点击验证密码', diff --git a/src/apps/com.tencent.mobileqq.ts b/src/apps/com.tencent.mobileqq.ts index 8d3ec5f08..f5be60896 100644 --- a/src/apps/com.tencent.mobileqq.ts +++ b/src/apps/com.tencent.mobileqq.ts @@ -40,7 +40,7 @@ export default defineGkdApp({ key: 0, name: '顶部横幅', matches: - 'ImageView[longClickable!=true] n TextView[clickable=false][text.length>0][text!~="(?is).*([01]?[0-9]|2[0-3])[::][0-5][0-9].*"] < [name$="ImageView"||name$="Button"][desc="关闭"||(desc=null&&text=null)][childCount=0][visibleToUser=true][clickable=true][longClickable!=true][left>0][vid!="chat_item_head_icon"]', + 'ImageView[longClickable!=true][vid!="chat_item_head_icon"][visibleToUser=true] n TextView[clickable=false][text.length>0][text!~="(?is).*([01]?[0-9]|2[0-3])[::][0-5][0-9].*"][text!$="G"&&text!$="M"&&text!$="k"][visibleToUser=true] < [name$="ImageView"||name$="Button"][desc="关闭"||(desc=null&&text=null)][childCount=0][visibleToUser=true][clickable=true][longClickable!=true][left>0][vid!="chat_item_head_icon"][visibleToUser=true]', excludeMatches: [ '[id^="com.tencent.mobileqq.qzone"]', // QQ空间 ], @@ -279,17 +279,16 @@ export default defineGkdApp({ name: '功能类-自动授权', desc: '自动点击登录。包括 PC 登录确认、QQ 互联登录确认。', quickFind: true, - activityIds: [ - 'com.tencent.mobileqq.activity.SplashActivity', - 'com.tencent.biz.qrcode.activity.QRLoginAuthActivity', - 'com.tencent.mobileqq.activity.DevlockQuickLoginActivity', - 'com.tencent.mobileqq.activity.DevLockQuickVerifyActivity', - 'com.tencent.open.agent.PublicFragmentActivityForOpenSDK', - ], rules: [ { key: 1, name: 'PC 登录确认', + activityIds: [ + 'com.tencent.mobileqq.activity.SplashActivity', + 'com.tencent.biz.qrcode.activity.QRLoginAuthActivity', + 'com.tencent.mobileqq.activity.DevlockQuickLoginActivity', + 'com.tencent.mobileqq.activity.DevLockQuickVerifyActivity', + ], matches: 'Button[text*="登录"][clickable=true][visibleToUser=true][text.length<10]', snapshotUrls: [ @@ -304,12 +303,21 @@ export default defineGkdApp({ { key: 2, name: '点击同意', + activityIds: [ + 'com.tencent.open.agent.PublicFragmentActivityForOpenSDK', + ], matches: 'Button[text="同意"][clickable=true][visibleToUser=true]', + excludeMatches: [ + '[text="群通知"]', // 群消息通知误触 + ], snapshotUrls: 'https://i.gkd.li/i/14752498', }, { preKeys: [2], key: 3, + activityIds: [ + 'com.tencent.open.agent.PublicFragmentActivityForOpenSDK', + ], name: '点击确认', matches: 'Button[text="确认"]', snapshotUrls: 'https://i.gkd.li/i/14752519', diff --git a/src/apps/com.tencent.qqmusic.ts b/src/apps/com.tencent.qqmusic.ts index d9a1a3770..db570660c 100644 --- a/src/apps/com.tencent.qqmusic.ts +++ b/src/apps/com.tencent.qqmusic.ts @@ -12,12 +12,6 @@ export default defineGkdApp({ 'com.tencent.qqmusic.business.playernew.view.NewPlayerActivity', ], rules: [ - { - key: 1, - quickFind: true, - matches: '[text^="广告"] + [text="跳过"][clickable=true]', - snapshotUrls: 'https://i.gkd.li/i/13985169', // 播放界面 - }, { key: 2, quickFind: true, diff --git a/src/apps/com.zmzx.college.search.ts b/src/apps/com.zmzx.college.search.ts index 1bd9fea3a..e5c7f1a10 100644 --- a/src/apps/com.zmzx.college.search.ts +++ b/src/apps/com.zmzx.college.search.ts @@ -93,6 +93,7 @@ export default defineGkdApp({ }, { key: 2, + quickFind: true, matches: '[vid="iv_native_close"]', snapshotUrls: 'https://i.gkd.li/i/15527866', },