Skip to content

Commit

Permalink
feat: 规则维护更新 (#277)
Browse files Browse the repository at this point in the history
* feat(qq): 授权登录时关闭获取QQ好友关系

* feat(微信): 小程序部分通用广告

* feat(高德地图): 卡片广告

* feat(京东): 横幅广告

* fix(微信): 朋友圈广告

* perf: 优化发送原图逻辑,限制只点击一次(#273)
  • Loading branch information
aoguai authored Sep 14, 2024
1 parent 55882ff commit 9f4b3eb
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 28 deletions.
40 changes: 30 additions & 10 deletions src/apps/com.autonavi.minimap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,6 @@ export default defineGkdApp({
},
{
key: 12,
name: '全屏广告-加油页面优惠券弹窗',
enable: false,
fastQuery: true,
activityIds: 'com.autonavi.map.activity.NewMapActivity',
rules:
'@ImageView < [desc="关闭"][clickable=true] <n * > * >n View[text="立即领取"]',
snapshotUrls: ['https://i.gkd.li/import/12642857'],
},
{
key: 13,
name: '全屏广告-广告弹窗',
desc: '点击关闭',
enable: false,
Expand All @@ -77,6 +67,36 @@ export default defineGkdApp({
matches: '[desc="弹窗"] + [vid="main_map_msg_dialog_close"]',
snapshotUrls: 'https://i.gkd.li/i/14809993',
},
{
key: 2,
name: '加油页面优惠券弹窗',
matches:
'@ImageView < [desc="关闭"][clickable=true] <n * > * >n View[text="立即领取"]',
snapshotUrls: ['https://i.gkd.li/import/12642857'],
},
],
},
{
key: 13,
name: '局部广告-卡片广告',
desc: '点击关闭',
rules: [
{
key: 1,
fastQuery: true,
activityIds: 'com.autonavi.map.activity.NewMapActivity',
matches:
'ViewGroup[desc="图片"][childCount=2] > ViewGroup[clickable=true] > @ImageView[childCount=0] <<n [vid="tab_container_id"]',
snapshotUrls: 'https://i.gkd.li/i/16960367',
},
{
key: 2,
fastQuery: true,
activityIds: 'com.autonavi.map.activity.NewMapActivity',
matches:
'@ImageView < ViewGroup[clickable=true] -2 * > View[text^="高德购票" && text$="优惠"] <<n [vid="mapInteractiveRelativeLayout"]',
snapshotUrls: 'https://i.gkd.li/i/16960157',
},
],
},
],
Expand Down
9 changes: 6 additions & 3 deletions src/apps/com.jingdong.app.mall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,12 @@ export default defineGkdApp({
},
{
key: 2,
fastQuery: true,
matches: '@ViewGroup[clickable=true] - * > [text="去续费"]',
snapshotUrls: 'https://i.gkd.li/i/15047238',
matches:
'ImageView +n ViewGroup >2 [text.length>0] < ViewGroup + @ViewGroup > ImageView',
snapshotUrls: [
'https://i.gkd.li/i/15047238',
'https://i.gkd.li/i/17001455',
],
},
{
key: 3,
Expand Down
40 changes: 26 additions & 14 deletions src/apps/com.tencent.mm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export default defineGkdApp({
{
key: 0,
name: '点击广告卡片右上角',
excludeMatches: [
'[text="设置备注和标签"]', // 设置备注页面
'[text="朋友权限"]', // 资料页面
],
matches:
'LinearLayout[visibleToUser=true][checked=false] >2 LinearLayout[visibleToUser=true][focusable=false] > TextView[text.length!=null] +1 LinearLayout[text.length=null&&desc=null&&clickable=true&&focusable=true]',
snapshotUrls: [
Expand Down Expand Up @@ -306,15 +310,20 @@ export default defineGkdApp({
desc: '图片和视频选择器-自动选中底部中间的发送原图',
enable: false,
fastQuery: true,
actionMaximum: 1,
activityIds: [
'com.tencent.mm.plugin.gallery.ui.AlbumPreviewUI',
'com.tencent.mm.plugin.gallery.ui.ImagePreviewUI',
],
rules: '@[desc="未选中,原图,复选框"] + [text="原图"]',
rules: '@[desc="未选中,原图,复选框"][visibleToUser=true] + [text="原图"]',
snapshotUrls: [
'https://i.gkd.li/import/12686641', // 未选中
'https://i.gkd.li/i/16987145', // 未选中
'https://i.gkd.li/i/16987144', // 未选中
'https://i.gkd.li/import/12840865', // 未选中
'https://i.gkd.li/import/12686640', // 已选中
'https://i.gkd.li/i/16987141', // 已选中
'https://i.gkd.li/i/16987147', // 已选中
'https://i.gkd.li/i/14661734',
],
},
Expand All @@ -339,8 +348,8 @@ export default defineGkdApp({
},
{
key: 10,
name: '全屏广告-小程序部分广告',
desc: '包括部分开屏广告',
name: '全屏广告-小程序部分通用广告',
desc: '包括部分开屏广告,弹窗广告等',
enable: false,
matchTime: 10000,
activityIds: [
Expand Down Expand Up @@ -371,22 +380,25 @@ export default defineGkdApp({
},
{
key: 1,
name: '提瓦特助手小程序-弹窗广告1',
name: '弹窗广告',
matchTime: 20000,
actionMaximum: 1,
resetMatch: 'app',
fastQuery: true,
excludeMatches: '[text="跳过"][visibleToUser=true]', // 防止提前触发导致失效
matches: [
'ImageView[childCount=0][visibleToUser=true] < FrameLayout < @FrameLayout[visibleToUser=true] <2 * - * >5 [text="查看详情"]',
'ImageView[childCount=0][visibleToUser=true] < FrameLayout < @FrameLayout[visibleToUser=true] <2 * - * >(4,5) [text="广告"||text="查看详情"]',
],
snapshotUrls: [
'https://i.gkd.li/i/13459614',
'https://i.gkd.li/i/16943989',
'https://i.gkd.li/i/16920797',
'https://i.gkd.li/import/12926021',
],
snapshotUrls: 'https://i.gkd.li/import/12926021',
excludeSnapshotUrls: 'https://i.gkd.li/i/16958795',
},
{
key: 2,
name: '提瓦特助手小程序-弹窗广告2',
fastQuery: 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,
Expand Down
17 changes: 16 additions & 1 deletion src/apps/com.tencent.mobileqq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,13 @@ export default defineGkdApp({
desc: '发送图片时自动勾选原图',
enable: false,
fastQuery: true,
actionMaximum: 1,
activityIds: [
'com.tencent.mobileqq.activity.SplashActivity',
'com.tencent.qqnt.qbasealbum.WinkHomeActivity',
'com.tencent.mobileqq.activity.photo.album.NewPhotoListActivity',
],
rules: '@CheckBox[checked=false] + [text="原图"]',
rules: '@CheckBox[checked=false][visibleToUser=true] + [text="原图"]',
snapshotUrls: [
'https://i.gkd.li/import/12705556', // 未勾选原图
'https://i.gkd.li/import/12705559', // 已勾选原图
Expand Down Expand Up @@ -639,5 +640,19 @@ export default defineGkdApp({
},
],
},
{
key: 28,
name: '功能类-授权登录时关闭获取QQ好友关系',
rules: [
{
fastQuery: true,
activityIds:
'com.tencent.open.agent.PublicFragmentActivityForOpenSDK',
matches:
'@CompoundButton[checked=true] - RelativeLayout > [text="你的QQ好友关系"]',
snapshotUrls: 'https://i.gkd.li/i/16929347',
},
],
},
],
});

0 comments on commit 9f4b3eb

Please sign in to comment.