Skip to content

Commit

Permalink
feat: 规则维护更新 (#164)
Browse files Browse the repository at this point in the history
* fix(阿里云盘): 自动签到

* feat(QQ音乐): 卡片广告

* chore(actions): check_format_lint

* feat: 全局规则-开屏广告

使用正则匹配排除含时间格式文本

* fix(知乎): 首页信息流广告

* fix(QQ): 消息页面顶部广告

* feat(学小易): 首页信息流广告

* chore(actions): check_format_lint

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
aoguai and github-actions[bot] committed Jun 11, 2024
1 parent 3836daf commit 6078d73
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 14 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 @@ -9,6 +9,9 @@ export default defineGkdApp({
name: '功能类-自动签到',
enable: false,
quickFind: true,
matchTime: 10000,
actionMaximum: 1,
resetMatch: 'app',
activityIds: [
'com.alicloud.databox.MainActivity',
'com.alicloud.databox.navigation.NavigationFragmentContainerActivity',
Expand All @@ -17,18 +20,21 @@ export default defineGkdApp({
{
key: 0,
name: '自动点击签到',
matches: '[vid="tvTaskAction"][text="领取"]',
snapshotUrls: 'https://i.gkd.li/import/12929318',
matches: '[text="领取"][clickable=true][visibleToUser=true]',
snapshotUrls: [
'https://i.gkd.li/import/12929318',
'https://i.gkd.li/i/15573070',
],
},
{
key: 1,
preKeys: [0],
name: '在签到后,关闭弹窗',
matches: '[vid="ivClose"]',
action: 'back',
matches: '[vid="ivCardBackBackground"][visibleToUser=true]',
snapshotUrls: [
'https://i.gkd.li/import/13038304',
'https://i.gkd.li/import/14235221', // com.alicloud.databox.navigation.NavigationFragmentContainerActivity
'https://i.gkd.li/i/14895886',
'https://i.gkd.li/i/15573070', // 签到前
'https://i.gkd.li/i/15573233', // 签到后
],
},
],
Expand Down
5 changes: 3 additions & 2 deletions src/apps/com.tencent.mobileqq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ export default defineGkdApp({
key: 0,
name: '顶部横幅',
matches:
'ImageView[clickable=false] <n * >n TextView[clickable=false][text.length>0] <<n * > [name$="ImageView"||name$="Button"][desc="关闭"||(desc=null&&text=null)][childCount=0][visibleToUser=true][clickable=true][longClickable!=true][left>0&&top>0]',
'ImageView <n * >n TextView[clickable=false][text.length>0][text!~="(?is).*([01]?[0-9]|2[0-3])[::][0-5][0-9].*"] <<n * > [name$="ImageView"||name$="Button"][desc="关闭"||(desc=null&&text=null)][childCount=0][visibleToUser=true][clickable=true][longClickable!=true]',
excludeMatches: [
'[vid="chat_item_head_icon"]', // 聊天界面头像
'[id^="com.tencent.mobileqq.qzone"]', // QQ空间
'[vid="chat_item_head_icon"]', // 聊天界面头像
],
snapshotUrls: [
'https://i.gkd.li/import/13426912',
Expand All @@ -68,6 +68,7 @@ export default defineGkdApp({
'https://i.gkd.li/import/14217033',
'https://i.gkd.li/i/14414585', // 误触
'https://i.gkd.li/i/15075866', // 误触
'https://i.gkd.li/i/15782476', // 误触
],
},
],
Expand Down
7 changes: 7 additions & 0 deletions src/apps/com.tencent.qqmusic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ export default defineGkdApp({
matches: '@[clickable=true] > [text="广告"]',
snapshotUrls: 'https://i.gkd.li/i/15041019',
},
{
key: 5,
quickFind: true,
matches:
'@ViewGroup[childCount=1][clickable=true] <<n RecyclerView >2 [text="最近播放"]',
snapshotUrls: 'https://i.gkd.li/i/15756931',
},
],
},
{
Expand Down
14 changes: 10 additions & 4 deletions src/apps/com.xuexiaoyi.xxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ export default defineGkdApp({
},
{
key: 1,
name: '点击在下方的X-2',
matches: ['[text="广告"] <<n FrameLayout > [desc^="dislike"] > View'],
snapshotUrls: ['https://i.gkd.li/i/15782668'],
},
{
key: 2,
name: '点击在上方的X-类型1',
matches: [
'Image[text.length>=20] < View < View + View > Image[text.length=0]',
Expand All @@ -44,15 +50,15 @@ export default defineGkdApp({
],
},
{
key: 2,
key: 3,
name: '点击在上方的X-类型2',
matches: [
'[text.length>=2&&text.length<=6] < FrameLayout -n FrameLayout > View',
],
snapshotUrls: ['https://i.gkd.li/import/13266689'],
},
{
key: 3,
key: 4,
name: '点击在内部的X',
matches: 'View[text.length=4] - View > View > Image[text.length=0]',
snapshotUrls: [
Expand All @@ -61,14 +67,14 @@ export default defineGkdApp({
],
},
{
key: 4,
key: 5,
name: '点击[反馈]',
matches:
'[text="广告"][visibleToUser=true] < * <n View +n [text="反馈"][visibleToUser=true]',
snapshotUrls: ['https://i.gkd.li/i/14965789'],
},
{
preKeys: [0, 1, 2, 3, 4],
preKeys: [0, 1, 2, 3, 4, 5],
key: 10,
name: '点击不感兴趣',
quickFind: true,
Expand Down
3 changes: 2 additions & 1 deletion src/apps/com.zhihu.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ export default defineGkdApp({
},
{
key: 1,
matches: '@ImageView[id=null] <<n * -3 * >2 [text*="广告"]',
matches: '@ImageView[id=null] <<n * -3 * >2 [text*="广告"][id=null]',
snapshotUrls: [
'https://i.gkd.li/import/14192451',
'https://i.gkd.li/i/14730741',
'https://i.gkd.li/i/15782386', // 误触
],
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/globalGroups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default defineGkdGlobalGroups([
rules: [
{
key: 0,
matches: `[childCount<7] > ${COMMON_PREFIX}[(text.length<10&&(text*="跳过"||text*="跳過"||text~="(?is).*skip.*"))||id~="(?is).*tt_splash_skip_btn"||vid~="(?is).*skip.*"||(vid~="(?is).*count.*"&&vid~="(?is).*down.*"&&vid!~="(?is).*load.*"&&vid!~="(?is).*hour.*"&&vid!~="(?is).*minute.*"&&vid!~="(?is).*add.*"&&vid!~="(?is).*ead.*")||desc*="跳过"||desc~="(?is).*skip.*"]`,
matches: `[childCount<7] > ${COMMON_PREFIX}[(text.length<10&&(text*="跳过"||text*="跳過"||text~="(?is).*skip.*"))||id~="(?is).*tt_splash_skip_btn"||vid~="(?is).*skip.*"||(vid~="(?is).*count.*"&&vid~="(?is).*down.*"&&vid!~="(?is).*load.*"&&vid!~="(?is).*hour.*"&&vid!~="(?is).*minute.*"&&vid!~="(?is).*add.*"&&vid!~="(?is).*ead.*")||desc*="跳过"||desc~="(?is).*skip.*"][text!~="([01]?[0-9]|2[0-3])[::][0-5][0-9]"][desc!~="([01]?[0-9]|2[0-3])[::][0-5][0-9]"]`,
},
{
key: 1,
Expand Down

0 comments on commit 6078d73

Please sign in to comment.