From 405f9da0b4e4e8a06a4177416999290d4e25b9ce Mon Sep 17 00:00:00 2001 From: Venture4241 Date: Sun, 14 Jul 2024 20:21:20 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E9=A1=B9=E7=9B=AE=E5=90=88=E5=B9=B6=20?= =?UTF-8?q?(#272)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Venture4241 Co-authored-by: jiuqianyuan <39406781+jiuqianyuan@users.noreply.github.com> Co-authored-by: AIsouler Co-authored-by: github-actions[bot] --- src/apps/cn.soulapp.android.ts | 7 ++++ src/apps/com.heytap.headset.ts | 18 +++++++++ src/apps/com.huawei.health.ts | 15 +++++++ src/apps/com.jianshu.haruki.ts | 28 +++++++++++++ src/apps/com.jsmcc.ts | 15 +++++++ src/apps/com.luna.music.ts | 14 +++++++ src/apps/com.overlook.android.fing.ts | 18 +++++++++ src/apps/com.ss.android.auto.ts | 30 +++++++++++--- src/apps/com.ss.android.ugc.aweme.ts | 26 +++++++++++++ src/apps/com.ss.android.yumme.video.ts | 54 ++++++++++++++++++++++++++ src/apps/com.videogo.ts | 17 +++++++- src/apps/com.xingin.xhs.ts | 6 +++ src/apps/net.csdn.csdnplus.ts | 2 +- 13 files changed, 243 insertions(+), 7 deletions(-) create mode 100644 src/apps/com.heytap.headset.ts create mode 100644 src/apps/com.overlook.android.fing.ts create mode 100644 src/apps/com.ss.android.yumme.video.ts diff --git a/src/apps/cn.soulapp.android.ts b/src/apps/cn.soulapp.android.ts index 10ec4a30..54479254 100644 --- a/src/apps/cn.soulapp.android.ts +++ b/src/apps/cn.soulapp.android.ts @@ -70,12 +70,19 @@ export default defineGkdApp({ matchTime: 10000, actionMaximum: 1, resetMatch: 'app', + actionMaximumKey: 0, rules: [ { + key: 0, matches: '@[id="cn.soulapp.android:id/img_close"] -2 RelativeLayout > [text="升级到最新版本"]', snapshotUrls: 'https://i.gkd.li/i/13693361', }, + { + key: 1, + matches: '[text="升级体验"] - [text="关闭"]', + snapshotUrls: 'https://i.gkd.li/i/15034131', + }, ], }, { diff --git a/src/apps/com.heytap.headset.ts b/src/apps/com.heytap.headset.ts new file mode 100644 index 00000000..26d2fccd --- /dev/null +++ b/src/apps/com.heytap.headset.ts @@ -0,0 +1,18 @@ +import { defineGkdApp } from '@gkd-kit/define'; + +export default defineGkdApp({ + id: 'com.heytap.headset', + name: '欢律', + groups: [ + { + key: 0, + name: '更新提示', + fastQuery: true, + actionMaximum: 1, + matchTime: 10000, + resetMatch: 'app', + rules: '[vid="tv_app_upgrade_cancel"]', + snapshotUrls: 'https://i.gkd.li/i/14971296', + }, + ], +}); diff --git a/src/apps/com.huawei.health.ts b/src/apps/com.huawei.health.ts index a7430192..01c8d280 100644 --- a/src/apps/com.huawei.health.ts +++ b/src/apps/com.huawei.health.ts @@ -82,5 +82,20 @@ export default defineGkdApp({ }, ], }, + { + key: 6, + name: '更新提示', + fastQuery: true, + actionMaximum: 1, + matchTime: 10000, + resetMatch: 'app', + rules: [ + { + action: 'back', + matches: '[text="发现新版本"]', + snapshotUrls: 'https://i.gkd.li/i/15521811', + }, + ], + }, ], }); diff --git a/src/apps/com.jianshu.haruki.ts b/src/apps/com.jianshu.haruki.ts index 5b345484..c91f0c82 100644 --- a/src/apps/com.jianshu.haruki.ts +++ b/src/apps/com.jianshu.haruki.ts @@ -19,5 +19,33 @@ export default defineGkdApp({ }, ], }, + { + key: 2, + name: '更新提示', + fastQuery: true, + actionMaximum: 1, + matchTime: 10000, + resetMatch: 'app', + rules: [ + { + action: 'back', + matches: '[text="升级到最新版本"]', + snapshotUrls: 'https://i.gkd.li/i/15989275', + }, + ], + }, + { + key: 3, + name: '局部广告-首页信息流广告', + desc: '点击关闭', + fastQuery: true, + rules: [ + { + matches: 'ImageView[vid="nativeAdClose"]', + activityIds: 'com.baiji.jianshu.MainActivity', + snapshotUrls: 'https://i.gkd.li/i/16201541', + }, + ], + }, ], }); diff --git a/src/apps/com.jsmcc.ts b/src/apps/com.jsmcc.ts index af8686ec..c7795ba7 100644 --- a/src/apps/com.jsmcc.ts +++ b/src/apps/com.jsmcc.ts @@ -19,5 +19,20 @@ export default defineGkdApp({ }, ], }, + { + key: 2, + name: '权限提示-通知权限', + fastQuery: true, + matchTime: 10000, + actionMaximum: 1, + resetMatch: 'app', + rules: [ + { + action: 'back', + matches: 'ImageView[vid="notice_dia"]', + snapshotUrls: 'https://i.gkd.li/i/16215987', + }, + ], + }, ], }); diff --git a/src/apps/com.luna.music.ts b/src/apps/com.luna.music.ts index 15f644e3..b9ace356 100644 --- a/src/apps/com.luna.music.ts +++ b/src/apps/com.luna.music.ts @@ -29,6 +29,20 @@ export default defineGkdApp({ }, ], }, + { + key: 1, + name: '更新提示', + fastQuery: true, + matchTime: 10000, + actionMaximum: 1, + resetMatch: 'app', + rules: [ + { + matches: '@[text="稍后再说"] + [text="立即升级"]', + snapshotUrls: 'https://i.gkd.li/i/14790279', + }, + ], + }, { key: 2, name: '全屏广告-VIP弹窗', diff --git a/src/apps/com.overlook.android.fing.ts b/src/apps/com.overlook.android.fing.ts new file mode 100644 index 00000000..c19f4220 --- /dev/null +++ b/src/apps/com.overlook.android.fing.ts @@ -0,0 +1,18 @@ +import { defineGkdApp } from '@gkd-kit/define'; + +export default defineGkdApp({ + id: 'com.overlook.android.fing', + name: 'Fing', + groups: [ + { + key: 0, + name: '功能类-教程弹窗', + fastQuery: true, + actionMaximum: 1, + matchTime: 10000, + resetMatch: 'app', + rules: '[text="關閉"]', + snapshotUrls: 'https://i.gkd.li/i/15521827', + }, + ], +}); diff --git a/src/apps/com.ss.android.auto.ts b/src/apps/com.ss.android.auto.ts index 7f0fd08a..8107c8b7 100644 --- a/src/apps/com.ss.android.auto.ts +++ b/src/apps/com.ss.android.auto.ts @@ -47,7 +47,6 @@ export default defineGkdApp({ key: 2, name: '更新提示', fastQuery: true, - matchTime: 10000, actionMaximum: 1, resetMatch: 'app', rules: @@ -108,10 +107,17 @@ export default defineGkdApp({ fastQuery: true, actionMaximum: 1, resetMatch: 'app', - rules: '@TextView[clickable=true] + [text*="推送通知"]', - snapshotUrls: [ - 'https://i.gkd.li/i/12840664', - 'https://i.gkd.li/i/14060897', + rules: [ + { + name: '调用返回', + action: 'back', + matches: 'TextView[text*="推送通知"]', + snapshotUrls: [ + 'https://i.gkd.li/i/12840664', + 'https://i.gkd.li/i/14060897', + 'https://i.gkd.li/i/14546563', + ], + }, ], }, { @@ -136,5 +142,19 @@ export default defineGkdApp({ }, ], }, + { + key: 9, + name: '评价提示', + fastQuery: true, + actionMaximum: 1, + resetMatch: 'app', + rules: [ + { + action: 'back', + matches: '[text="去评价"]', + snapshotUrls: 'https://i.gkd.li/i/14810042', + }, + ], + }, ], }); diff --git a/src/apps/com.ss.android.ugc.aweme.ts b/src/apps/com.ss.android.ugc.aweme.ts index 345706d7..aade3aa8 100644 --- a/src/apps/com.ss.android.ugc.aweme.ts +++ b/src/apps/com.ss.android.ugc.aweme.ts @@ -326,5 +326,31 @@ export default defineGkdApp({ }, ], }, + { + key: 21, + name: '权限提示-定位权限', + desc: '直接关闭所有类似形状窗口', + fastQuery: true, + matchTime: 10000, + actionMaximum: 1, + resetMatch: 'app', + rules: [ + { + key: 0, + name: '弹窗', + action: 'back', + matches: '[id="com.ss.android.ugc.aweme:id/rootview"]', + snapshotUrls: 'https://i.gkd.li/i/13755373', + }, + { + key: 1, + name: '顶部横条', + activityIds: + 'com.ss.android.ugc.aweme.search.activity.SearchResultActivity', + matches: '@ImageView[clickable=true] - [text^="开启定位"]', + snapshotUrls: 'https://i.gkd.li/i/13755718', + }, + ], + }, ], }); diff --git a/src/apps/com.ss.android.yumme.video.ts b/src/apps/com.ss.android.yumme.video.ts new file mode 100644 index 00000000..9ffaf2a4 --- /dev/null +++ b/src/apps/com.ss.android.yumme.video.ts @@ -0,0 +1,54 @@ +import { defineGkdApp } from '@gkd-kit/define'; + +export default defineGkdApp({ + id: 'com.ss.android.yumme.video', + name: '抖音精选', + groups: [ + { + key: 1, + name: '青少年模式', + fastQuery: true, + matchTime: 10000, + actionMaximum: 1, + resetMatch: 'app', + rules: [ + { + action: 'back', + matches: 'Button[text="开启青少年模式"]', + snapshotUrls: 'https://i.gkd.li/i/15858125', + }, + ], + }, + { + key: 2, + name: '更新提示', + fastQuery: true, + matchTime: 10000, + actionMaximum: 1, + resetMatch: 'app', + rules: [ + { + matches: ['[text="立即升级"]', '[text="以后再说"]'], + snapshotUrls: [ + 'https://i.gkd.li/i/12534016', + 'https://i.gkd.li/i/13328599', + ], + }, + ], + }, + { + key: 3, + name: '评价提示', + fastQuery: true, + actionMaximum: 1, + matchTime: 10000, + rules: [ + { + action: 'back', + matches: 'TextView[text="去商店评分"]', + snapshotUrls: 'https://i.gkd.li/i/15858132', + }, + ], + }, + ], +}); diff --git a/src/apps/com.videogo.ts b/src/apps/com.videogo.ts index 59e9c637..f89a55b6 100644 --- a/src/apps/com.videogo.ts +++ b/src/apps/com.videogo.ts @@ -8,7 +8,7 @@ export default defineGkdApp({ key: 1, name: '分段广告-主页广告', fastQuery: true, - activityIds: ['com.videogo.main.MainTabActivity'], + activityIds: 'com.videogo.main.MainTabActivity', rules: [ { key: 0, @@ -22,5 +22,20 @@ export default defineGkdApp({ }, ], }, + { + key: 7, + name: '全屏广告-在线值守广告', + fastQuery: true, + actionMaximum: 1, + matchTime: 10000, + resetMatch: 'app', + rules: [ + { + action: 'back', + matches: 'TextView[text="了解并试用服务"]', + snapshotUrls: 'https://i.gkd.li/i/15338834', + }, + ], + }, ], }); diff --git a/src/apps/com.xingin.xhs.ts b/src/apps/com.xingin.xhs.ts index 395eca0e..63dabecd 100644 --- a/src/apps/com.xingin.xhs.ts +++ b/src/apps/com.xingin.xhs.ts @@ -36,6 +36,7 @@ export default defineGkdApp({ matchTime: 10000, actionMaximum: 1, resetMatch: 'app', + actionMaximumKey: 0, rules: [ { key: 0, @@ -46,6 +47,11 @@ export default defineGkdApp({ 'https://i.gkd.li/i/14445193', ], }, + { + key: 1, + matches: 'Button[text="立即安装"] + Button[text="稍后再说"]', + snapshotUrls: 'https://i.gkd.li/i/15283162', + }, ], }, { diff --git a/src/apps/net.csdn.csdnplus.ts b/src/apps/net.csdn.csdnplus.ts index 748531ed..76cc961c 100644 --- a/src/apps/net.csdn.csdnplus.ts +++ b/src/apps/net.csdn.csdnplus.ts @@ -15,7 +15,7 @@ export default defineGkdApp({ rules: [ { key: 0, - matches: '[text*="跳过"][text.length<=10]', + matches: '[text*="跳过"][text.length<=10][visibleToUser=true]', snapshotUrls: 'https://i.gkd.li/i/12673680', }, {