Skip to content

Commit

Permalink
feat: 规则维护更新 (#107)
Browse files Browse the repository at this point in the history
* fix(淘宝): 通知提示失效

* feat(中国电信): 浮窗广告

* perf(微信): 微信小程序-开屏广告

* fix(京东): 悬浮广告误触

* feat(京东): 横幅广告

* feat(百度贴吧): 广告弹窗

* feat(微信): 微信自动授权

* feat(QQ): QQ小程序开屏广告, 申请入群后自动点击右上角关闭

* feat(知乎): 悬浮广告

* feat(中国电信): 浮窗广告

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

* feat(QQ): 弹窗广告, 个人主页广告

* feat((小米手机管家): 忽略体检优化提示

* fix: some error

* chore(actions): check_format_lint

* fix(百度贴吧): 广告弹窗

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
aoguai and github-actions[bot] committed Apr 29, 2024
1 parent d7fa7df commit 10ef78b
Show file tree
Hide file tree
Showing 8 changed files with 91 additions and 41 deletions.
8 changes: 7 additions & 1 deletion src/apps/com.baidu.tieba.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,15 @@ export default defineGkdApp({
{
key: 2,
name: '点击正下方x关闭2',
forcedTime: 5000,
matches:
'[text$="弹窗"] >3 Image[clickable=true][index=2][text!=null]',
snapshotUrls: 'https://i.gkd.li/i/14630806',
snapshotUrls: [
'https://i.gkd.li/i/14630806',
'https://i.gkd.li/i/14630806',
'https://i.gkd.li/i/15119439',
'https://i.gkd.li/i/15119451',
],
},
],
},
Expand Down
6 changes: 5 additions & 1 deletion src/apps/com.ct.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,15 @@ export default defineGkdApp({
snapshotUrls: [
'https://i.gkd.li/import/12819676',
'https://i.gkd.li/import/12913735',
'https://i.gkd.li/i/15104434',
],
},
{
matches: 'ImageView[id="com.ct.client:id/ivFloatClose"]',
snapshotUrls: ['https://i.gkd.li/import/13043345'],
snapshotUrls: [
'https://i.gkd.li/import/13043345',
'https://i.gkd.li/i/15137220',
],
},
],
},
Expand Down
16 changes: 10 additions & 6 deletions src/apps/com.jingdong.app.mall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ export default defineGkdApp({
key: 0,
name: '参与调研',
matches:
'FrameLayout + RelativeLayout > RelativeLayout > ImageView + ImageView[desc!="返回"][visibleToUser=true]',
'FrameLayout + RelativeLayout > RelativeLayout > ImageView[visibleToUser=true] + ImageView[desc!="返回"][visibleToUser=true]',
snapshotUrls: [
'https://i.gkd.li/import/12642270',
'https://i.gkd.li/import/12774910', // 使用 [desc!="返回"] 进行限定,防止在进入商品详情页时点击返回按钮
'https://i.gkd.li/i/15110548', // 避免误触
],
},
{
Expand Down Expand Up @@ -148,12 +149,11 @@ export default defineGkdApp({
},
{
key: 6,
name: '局部广告-底部横幅广告',
name: '局部广告-横幅广告',
activityIds: 'com.jingdong.app.mall.MainFrameActivity',
rules: [
{
key: 0,
name: '类型1',
matches:
'ImageView < FrameLayout - FrameLayout > ImageView[desc="关闭"]',
snapshotUrls: [
Expand All @@ -164,18 +164,22 @@ export default defineGkdApp({
},
{
key: 1,
name: '类型2',
matches:
'@View[clickable=true][longClickable=false] -n ImageView <n RelativeLayout',
'@View[desc.length=null][clickable=true][longClickable=false] -n ImageView <n RelativeLayout',
snapshotUrls: 'https://i.gkd.li/import/14163014',
},
{
key: 2,
name: '类型3',
quickFind: true,
matches: '@ViewGroup[clickable=true] - * > [text="去续费"]',
snapshotUrls: 'https://i.gkd.li/i/15047238',
},
{
key: 3,
matches:
'[desc="吸顶楼层"] > [desc="关闭按钮"][clickable=true][visibleToUser=true]',
snapshotUrls: 'https://i.gkd.li/i/15112953',
},
],
},
{
Expand Down
17 changes: 14 additions & 3 deletions src/apps/com.miui.securitycenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,33 @@ export default defineGkdApp({
},
{
key: 12,
name: '功能类-忽略体检分数',
desc: '退出时忽略体检优化分数',
name: '功能类-忽略体检优化提示',
desc: '退出时忽略[体检优化分数]/忽略[存储空间预警]',
enable: false,
quickFind: true,
activityIds: 'com.miui.securityscan.MainActivity',
rules: [
{
key: 1,
name: '忽略优化分数',
matches: [
'[text="手机体检分数不足75分,是否立即优化?"][id$="id/message"]',
'[text^="手机体检分数不足"][id$="id/message"]',
'[text="退出"]',
],
snapshotUrls: [
'https://i.gkd.li/import/13474504', // app版本v5
'https://i.gkd.li/import/13476770', // app版本v8
],
},
{
key: 2,
name: '忽略存储空间预警',
matches: [
'[text$="释放存储空间"][id$="id/message"]',
'[text="退出"]',
],
snapshotUrls: ['https://i.gkd.li/i/15137908'],
},
],
},
{
Expand Down
3 changes: 2 additions & 1 deletion src/apps/com.taobao.taobao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,14 @@ export default defineGkdApp({
'com.taobao.tao.TBMainActivity',
],
rules:
'[text^="开启系统通知"] + @Image[clickable=true] <<n [id="com.taobao.taobao:id/poplayer_inner_view"]',
'[text^="开启系统通知"] + @Image[visibleToUser=true] <<n [id="com.taobao.taobao:id/poplayer_inner_view"]',
snapshotUrls: [
'https://i.gkd.li/import/13197594', //com.taobao.tao.welcome.Welcome
'https://i.gkd.li/import/13222946', //com.taobao.android.order.bundle.TBOrderDetailActivity
'https://i.gkd.li/import/13438404', //com.taobao.android.tbabilitykit.pop.StdPopContainerActivity
'https://i.gkd.li/import/13446901',
'https://i.gkd.li/import/13455424', //com.taobao.tao.TBMainActivity
'https://i.gkd.li/i/15104645',
],
},
{
Expand Down
34 changes: 9 additions & 25 deletions src/apps/com.tencent.mm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ export default defineGkdApp({
key: 2,
name: '选择关闭该广告的原因->关闭该广告',
matches:
'TextView[(text^="关闭"&&text$="广告")||(text^="關閉"&&text$="廣告")||text~="Close.*"][clickable=true]',
'TextView[(text^="关闭"&&text$="广告")||(text^="關閉"&&text$="廣告")||text~="(?is).*Close.*"][clickable=true]',
snapshotUrls: [
'https://i.gkd.li/import/12907642',
'https://i.gkd.li/import/13926578',
'https://i.gkd.li/i/14207480',
'https://i.gkd.li/i/15137016',
],
},
// 情况3 - 点击[确认]关闭该广告
Expand Down Expand Up @@ -96,6 +97,7 @@ export default defineGkdApp({
'com.tencent.mm.plugin.webview.ui.tools.SDKOAuthUI',
'com.tencent.mm.plugin.webview.ui.tools.MMWebViewUI',
'com.tencent.mm.ui.LauncherUI',
'com.tencent.mm.plugin.base.stub.UIEntryStub',
],
rules: [
{
Expand All @@ -110,9 +112,11 @@ export default defineGkdApp({
{
key: 1,
name: '浏览器扫码登录',
matches: 'Button[text="拒绝"] - Button[text="允许"]',
matches: ['[text^="获取你的"]', '[text="允许"]'],
snapshotUrls: [
'https://i.gkd.li/import/13065462', //com.tencent.mm.ui.LauncherUI
'https://i.gkd.li/import/12663602',
'https://i.gkd.li/import/14164920',
],
},
{
Expand Down Expand Up @@ -162,25 +166,6 @@ export default defineGkdApp({
},
],
},
{
key: 3,
name: '功能类-第三方 APP 申请使用授权弹窗',
desc: '由于此界面可以额外新建昵称头像,默认不启用',
enable: false,
quickFind: true,
matchTime: 10000,
actionMaximum: 1,
resetMatch: 'activity',
activityIds: [
'com.tencent.mm.plugin.base.stub.UIEntryStub',
'com.tencent.mm.plugin.webview.ui.tools.SDKOAuthUI',
],
rules: 'Button[text="拒绝"] - Button[text="允许"]',
snapshotUrls: [
'https://i.gkd.li/import/12663602',
'https://i.gkd.li/import/14164920',
],
},
{
key: 5,
name: '功能类-微信红包自动领取',
Expand Down Expand Up @@ -321,8 +306,6 @@ export default defineGkdApp({
enable: false,
quickFind: true,
matchTime: 10000,
// actionMaximum: 1, // 经常需要点2次,首次点击过早大概率跳不过
// resetMatch: 'activity',
activityIds: [
'com.tencent.mm.plugin.appbrand.ui.AppBrandUI',
'com.tencent.mm.plugin.appbrand.launching.AppBrandLaunchProxyUI',
Expand All @@ -331,8 +314,8 @@ 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/import/12701979',
Expand All @@ -342,6 +325,7 @@ export default defineGkdApp({
'https://i.gkd.li/import/13306883',
'https://i.gkd.li/import/12785246',
'https://i.gkd.li/import/13407275',
'https://i.gkd.li/i/15108441',
],
},
],
Expand Down
46 changes: 43 additions & 3 deletions src/apps/com.tencent.mobileqq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,15 @@ export default defineGkdApp({
'RelativeLayout >5 ViewGroup[childCount=6] > ViewGroup[index=2][clickable=true]',
snapshotUrls: 'https://i.gkd.li/import/14207286',
},
{
key: 5,
quickFind: true,
activityIds:
'com.tencent.mobileqq.activity.QPublicTransFragmentActivity',
matches:
'ViewGroup[childCount=6] > @ViewGroup[index=2][clickable=true][visibleToUser=true] <<n [id="android:id/content"]',
snapshotUrls: 'https://i.gkd.li/i/15136939',
},
],
},
{
Expand Down Expand Up @@ -386,17 +395,21 @@ export default defineGkdApp({
name: '全屏广告-QQ小程序开屏广告',
enable: false,
quickFind: true,
actionMaximum: 1,
activityIds: [
'com.tencent.mobileqq.mini.appbrand.ui.AppBrandUI',
'com.tencent.mobileqq.activity.miniaio.MiniChatActivity',
],
rules: [
{
matches:
'TextView[text = "广告"] < RelativeLayout + RelativeLayout TextView[text = "跳过"]',
matches: [
'[text="广告"][visibleToUser=true]',
'[text="跳过"][visibleToUser=true]',
],
snapshotUrls: [
'https://i.gkd.li/import/12877215',
'https://i.gkd.li/import/12919195',
'https://i.gkd.li/i/15130235',
],
},
],
Expand Down Expand Up @@ -544,10 +557,37 @@ export default defineGkdApp({
activityIds: 'com.tencent.mobileqq.activity.QQBrowserActivity',
rules: [
{
matches: 'RelativeLayout[childCount=2] > [text="关闭"]',
matches: [
'TextView[text="入群申请中"][visibleToUser=true]',
'TextView[text="关闭"][visibleToUser=true]',
],
snapshotUrls: 'https://i.gkd.li/import/14235163',
},
],
},
{
key: 26,
name: '全屏广告-个人主页广告',
desc: '点击关闭',
rules: [
{
key: 0,
name: '迷你窝弹窗',
quickFind: true,
action: 'back',
activityIds:
'com.tencent.mobileqq.profilecard.activity.FriendProfileCardActivity',
matches: '[text="开启迷你窝"]',
snapshotUrls: 'https://i.gkd.li/i/14188980',
},
{
key: 1,
name: '个性装扮弹窗',
activityIds: 'cooperation.vip.ad.UserLeadingActivity',
matches: '[desc="关闭"][visibleToUser=true]', // 右侧关闭按钮无效
snapshotUrls: 'https://i.gkd.li/i/15137056',
},
],
},
],
});
2 changes: 1 addition & 1 deletion src/apps/com.zhihu.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export default defineGkdApp({
{
key: 0,
name: '发现页面-右侧年卡折扣悬浮窗',
matches: '@[vid="activity_close"] + * > [vid="activity_img"]',
matches: ['[vid="activity_img"]', '[vid="activity_close"]'],
snapshotUrls: 'https://i.gkd.li/import/14296251',
},
{
Expand Down

0 comments on commit 10ef78b

Please sign in to comment.