Skip to content

Commit

Permalink
feat: 更新规则
Browse files Browse the repository at this point in the history
  • Loading branch information
MengNianxiaoyao committed Apr 27, 2024
1 parent 42a1e66 commit 0b3c425
Show file tree
Hide file tree
Showing 19 changed files with 169 additions and 78 deletions.
18 changes: 12 additions & 6 deletions src/apps/com.alicloud.databox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default defineGkdApp({
{
key: 0,
name: '功能类-自动签到',
quickFind: true,
activityIds: [
'com.alicloud.databox.MainActivity',
'com.alicloud.databox.navigation.NavigationFragmentContainerActivity',
Expand All @@ -15,21 +16,26 @@ export default defineGkdApp({
{
key: 0,
name: '自动点击签到',
quickFind: true,
matches: '[id="com.alicloud.databox:id/tvTaskAction"][text="领取"]',
snapshotUrls: 'https://i.gkd.li/i/12929318',
},
{
key: 1,
preKeys: [0],
name: '在签到后,关闭弹窗',
quickFind: true,
matches: '[id="com.alicloud.databox:id/ivClose"]',
key: 1,
name: '关闭弹窗-1',
matches: '[vid="ivClose"]',
snapshotUrls: [
'https://i.gkd.li/i/13038304',
'https://i.gkd.li/i/14235221', // com.alicloud.databox.navigation.NavigationFragmentContainerActivity
'https://i.gkd.li/i/14235221',
],
},
{
preKeys: [1],
key: 2,
name: '关闭弹窗-2',
matches: '[vid="ivClose"]',
snapshotUrls: 'https://i.gkd.li/i/15119433',
},
],
},
{
Expand Down
8 changes: 6 additions & 2 deletions src/apps/com.android.icredit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ export default defineGkdApp({
rules: [
{
activityIds: 'com.android.icredit.ui.MainMenuActivity',
matches: '[text$="限时返场"] >3 Image',
matches:
'[text$="限时返场" || text="首单有礼"] >2 View[childCount=2] > Image[visibleToUser=true]',
exampleUrls:
'https://m.gkd.li/57941037/eb232325-12e4-495f-a9f3-5f853d5e66f9',
snapshotUrls: 'https://i.gkd.li/i/14720494',
snapshotUrls: [
'https://i.gkd.li/i/14720494',
'https://i.gkd.li/i/15112280',
],
},
],
},
Expand Down
13 changes: 10 additions & 3 deletions src/apps/com.baidu.tieba.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,19 @@ export default defineGkdApp({
resetMatch: 'app',
rules: [
{
activityIds: 'com.baidu.tieba.tblauncher.MainTabActivity',
activityIds: [
'com.baidu.tieba.tblauncher.MainTabActivity',
'com.baidu.tbadk.browser.TBWebContainerActivity',
],
matches:
'[text="会员弹窗"] >3 Image[clickable=true][index=2][text!=null]',
'WebView[text="会员弹窗" || text="一键签到"] >3 TextView + Image[text!=null][childCount=0][visibleToUser=true]',
exampleUrls:
'https://m.gkd.li/57941037/dd2f2a00-e9d3-47fa-986d-09ae6180d932',
snapshotUrls: 'https://i.gkd.li/i/14630806',
snapshotUrls: [
'https://i.gkd.li/i/14630806',
'https://i.gkd.li/i/15119439',
'https://i.gkd.li/i/15119451',
],
},
],
},
Expand Down
14 changes: 11 additions & 3 deletions src/apps/com.ct.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,19 @@ export default defineGkdApp({
name: '全屏广告-浮窗广告',
desc: '会出现在首页、查询办理页面',
quickFind: true,
activityIds: 'com.ct.client.common.ConfirmDialogActivity',
actionMaximum: 1,
resetMatch: 'app',
activityIds: [
'com.ct.client.common.ConfirmDialogActivity',
'com.ct.client.activity.MainActivity',
],
rules: [
{
matches: 'ImageView[id="com.ct.client:id/close"]',
snapshotUrls: 'https://i.gkd.li/i/12819676',
matches: '[vid="rlActivity"] > [vid="close"]',
snapshotUrls: [
'https://i.gkd.li/i/12819676',
'https://i.gkd.li/i/15104434',
],
},
],
},
Expand Down
11 changes: 9 additions & 2 deletions src/apps/com.jingdong.app.mall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ export default defineGkdApp({
{
key: 0,
matches:
'FrameLayout + RelativeLayout > RelativeLayout > ImageView + ImageView[desc!="返回"][visibleToUser=true]',
'FrameLayout + RelativeLayout > RelativeLayout > ImageView + ImageView[desc=null][visibleToUser=true]',
snapshotUrls: [
'https://i.gkd.li/i/12642270',
'https://i.gkd.li/i/12774910', // 使用 [desc!="返回"] 进行限定,防止在进入商品详情页时点击返回按钮
'https://i.gkd.li/i/15110548', // 避免误触
],
},
{
Expand Down Expand Up @@ -123,7 +124,7 @@ export default defineGkdApp({
},
{
key: 6,
name: '局部广告-首页底部横幅广告',
name: '局部广告-横幅广告',
activityIds: 'com.jingdong.app.mall.MainFrameActivity',
rules: [
{
Expand All @@ -142,6 +143,12 @@ export default defineGkdApp({
matches: '@ViewGroup[clickable=true] - * > [text="去续费"]',
snapshotUrls: 'https://i.gkd.li/i/15047238',
},
{
key: 2,
matches:
'[desc="吸顶楼层"] > [desc="关闭按钮"][clickable=true][visibleToUser=true]',
snapshotUrls: 'https://i.gkd.li/i/15112953',
},
],
},
{
Expand Down
10 changes: 10 additions & 0 deletions src/apps/com.mxchip.petmarvel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,22 @@ export default defineGkdApp({
matchTime: 10000,
actionMaximum: 1,
resetMatch: 'app',
actionMaximumKey: 0,
rules: [
{
key: 0,
quickFind: true,
matches: '[text*="跳过"][text.length<10][visibleToUser=true]',
snapshotUrls: 'https://i.gkd.li/i/15102179',
},
{
key: 1,
position: {
left: 'width * 0.8379',
top: 'width * 0.2055',
},
excludeActivityIds:
'[text*="跳过"][text.length<10][visibleToUser=true]',
matches: 'FrameLayout[depth=0]',
snapshotUrls: 'https://i.gkd.li/i/14717741',
},
Expand Down
12 changes: 10 additions & 2 deletions src/apps/com.netease.cloudmusic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,20 @@ export default defineGkdApp({
},
{
key: 4,
name: '播放页赞赏好音乐弹窗',
quickFind: true,
action: 'back',
activityIds: 'com.netease.cloudmusic.activity.PlayerActivity',
matches: '@ImageView[clickable=true] +3 * > [text="立即支持"]',
matches: '[text="赞赏功能全新升级啦"]',
snapshotUrls: 'https://i.gkd.li/i/13848913',
},
{
key: 5,
quickFind: true,
action: 'back',
activityIds: 'com.netease.cloudmusic.activity.PlayerActivity',
matches: '[text="立即限免体验"]',
snapshotUrls: 'https://i.gkd.li/i/15125892',
},
],
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/apps/com.sina.weibo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export default defineGkdApp({
key: 3,
activityIds: 'com.sina.weibo.feed.MPDialogActivity',
matches:
'[text^="今日签到"] <n * + @TextView[clickable=true] <<n [vid="container"]',
'[text^="今日签到"] <n * + @TextView[visibleToUser=true] <<n [vid="container"]',
snapshotUrls: 'https://i.gkd.li/i/14969848',
},
{
Expand Down
17 changes: 17 additions & 0 deletions src/apps/com.ss.android.article.news.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,5 +199,22 @@ export default defineGkdApp({
},
],
},
{
key: 17,
name: '功能类-[下次打开APP默认进入发现频道]弹窗',
desc: '点击取消',
actionMaximum: 1,
resetMatch: 'app',
rules: [
{
quickFind: true,
activityIds: 'com.ss.android.article.news.activity.MainActivity',
matches: '[text^="下次打开APP默认进入"]',
exampleUrls:
'https://m.gkd.li/57941037/6166519d-d38d-49c0-b54b-72c25670aa24',
snapshotUrls: 'https://i.gkd.li/i/15102876',
},
],
},
],
});
19 changes: 18 additions & 1 deletion src/apps/com.taobao.taobao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@ export default defineGkdApp({
actionMaximum: 1,
resetMatch: 'app',
rules:
'[text^="开启系统通知"] + @Image[clickable=true] <<n [id="com.taobao.taobao:id/poplayer_inner_view"]',
'[text^="开启系统通知"] + @Image[visibleToUser=true] <<n [vid="poplayer_inner_view"]',
snapshotUrls: [
'https://i.gkd.li/i/13446901',
'https://i.gkd.li/i/13455424',
'https://i.gkd.li/i/15104645',
],
},
{
Expand Down Expand Up @@ -235,5 +236,21 @@ export default defineGkdApp({
},
],
},
{
key: 19,
name: '局部广告-商品详情页直播悬浮窗',
desc: '点击关闭',
quickFind: true,
matchTime: 10000,
actionMaximum: 1,
rules: [
{
activityIds:
'com.taobao.android.detail.wrapper.activity.DetailActivity',
matches: '[vid="view_close"]',
snapshotUrls: 'https://i.gkd.li/i/15124094',
},
],
},
],
});
44 changes: 19 additions & 25 deletions src/apps/com.tencent.mm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,30 +142,26 @@ export default defineGkdApp({
},
{
key: 2,
name: '功能类-浏览器扫码微信登录自动授权',
name: '功能类-自动授权登录',
desc: '自动允许使用头像昵称等',
quickFind: true,
matchTime: 10000,
actionMaximum: 1,
resetMatch: 'activity',
activityIds: [
'com.tencent.mm.plugin.webview.ui.tools.SDKOAuthUI',
'com.tencent.mm.plugin.base.stub.UIEntryStub',
'com.tencent.mm.ui.LauncherUI',
],
rules: 'Button[text="拒绝"] - Button[text="允许"]',
snapshotUrls: 'https://i.gkd.li/i/13065462',
},
{
key: 3,
name: '功能类-第三方APP申请使用授权弹窗',
desc: '自动点击允许,但由于此界面可以额外新建昵称头像,默认不启用',
quickFind: true,
matchTime: 10000,
actionMaximum: 1,
resetMatch: 'activity',
activityIds: 'com.tencent.mm.plugin.base.stub.UIEntryStub',
rules: 'Button[text="拒绝"] - Button[text="允许"]',
snapshotUrls: 'https://i.gkd.li/i/12663602',
rules: [
{
matches: ['[text^="获取你的"]', '[text="允许"]'],
snapshotUrls: [
'https://i.gkd.li/i/12663602',
'https://i.gkd.li/i/13065462',
],
},
],
},
{
key: 4,
Expand Down Expand Up @@ -358,17 +354,14 @@ export default defineGkdApp({
{
actionDelay: 800, // 过早点击首次大概率跳不过
matches: [
'FrameLayout > TextView + FrameLayout > TextView[text="广告"]',
'FrameLayout > TextView + FrameLayout > TextView[text="跳过"]',
'[text="广告"][visibleToUser=true]',
'[text="跳过"][visibleToUser=true]',
],
snapshotUrls: [
'https://i.gkd.li/i/12701979',
'https://i.gkd.li/i/12777076',
'https://i.gkd.li/i/12785012',
'https://i.gkd.li/i/12785183',
'https://i.gkd.li/i/13306883',
'https://i.gkd.li/i/12785246',
'https://i.gkd.li/i/13407275',
'https://i.gkd.li/i/15108441',
],
},
],
Expand Down Expand Up @@ -396,7 +389,7 @@ export default defineGkdApp({
'com.tencent.mm.plugin.finder.ui.',
'com.tencent.mm.ui.LauncherUI',
],
matches: '[text*="青少年模式"] <n * > [text="我知道了"]',
matches: ['[text*="青少年模式"]', '[text="我知道了"]'],
snapshotUrls: [
'https://i.gkd.li/i/13538145',
'https://i.gkd.li/i/13575195',
Expand Down Expand Up @@ -478,7 +471,7 @@ export default defineGkdApp({
quickFind: true,
activityIds: 'com.tencent.mm.framework.app.UIPageFragmentActivity',
matches:
'[text="完成" || text="返回商家"] <2 [vid="kinda_button_impl_wrapper"]',
'[vid="kinda_button_impl_wrapper"][desc="完成" || desc="返回商家"]',
exampleUrls:
'https://m.gkd.li/57941037/a5177d9d-6745-443f-baf5-af57153430d8',
snapshotUrls: [
Expand Down Expand Up @@ -546,9 +539,10 @@ export default defineGkdApp({
desc: '点击关闭',
rules: [
{
quickFind: true,
activityIds: 'com.tencent.mm.plugin.webview.ui.tools.MMWebViewUI',
matches:
'@TextView[clickable=true] + * > [text="腾讯文档"] + [text^="使用 APP"]',
'@TextView[clickable=true] + * > [text^="使用 APP"] <<n [id="android:id/content"]',
exampleUrls:
'https://m.gkd.li/57941037/2228f99e-e0a1-4915-864f-d60e3d8580a6',
snapshotUrls: 'https://i.gkd.li/i/14533286',
Expand Down Expand Up @@ -595,7 +589,7 @@ export default defineGkdApp({
{
quickFind: true,
activityIds: 'com.tencent.mm.pluginsdk.permission.PermissionActivity',
matches: '@[text="取消"] < * < * - * >3 [text="权限申请"]',
matches: ['[text="权限申请"]', '[text="取消"]'],
exampleUrls:
'https://m.gkd.li/57941037/43632b72-d389-4fe7-9708-dac78e900679',
snapshotUrls: 'https://i.gkd.li/i/14645385',
Expand Down
Loading

0 comments on commit 0b3c425

Please sign in to comment.