Skip to content

Commit

Permalink
feat: 规则维护更新 (#145)
Browse files Browse the repository at this point in the history
* feat(闲鱼): 自动查看原图

* feat(淘宝): 关闭支付相关推荐开通

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

* chore(actions): check_format_lint

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

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

* feat(大学搜题酱): 全屏广告, 信息流广告

* chore(actions): check_format_lint

* perf(京东): 悬浮广告

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

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
aoguai and github-actions[bot] committed Jun 1, 2024
1 parent fa483fd commit 7f3a6c0
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 40 deletions.
13 changes: 3 additions & 10 deletions src/apps/com.jingdong.app.mall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default defineGkdApp({
groups: [
{
key: 2,
name: '局部广告-我的页面悬浮广告',
name: '局部广告-悬浮广告',
activityIds: 'com.jingdong.app.mall.MainFrameActivity',
rules: [
{
Expand All @@ -27,15 +27,8 @@ export default defineGkdApp({
'@ImageView[id!=null] + FrameLayout[childCount=3] > ImageView + LinearLayout + TextView',
snapshotUrls: 'https://i.gkd.li/import/13242002',
},
],
},
{
key: 3,
name: '局部广告-悬浮广告',
activityIds: 'com.jingdong.app.mall.MainFrameActivity',
rules: [
{
key: 0,
key: 2,
name: '首页广告',
matches:
'RelativeLayout >n * > [desc^="关闭浮层"][clickable=true][visibleToUser=true]',
Expand All @@ -48,7 +41,7 @@ export default defineGkdApp({
],
},
{
key: 1,
key: 3,
name: '购物车页面砸金蛋',
quickFind: true,
matches: '[id="com.jd.lib.cart.feature:id/iv_egg_close"]',
Expand Down
13 changes: 13 additions & 0 deletions src/apps/com.taobao.idlefish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,18 @@ export default defineGkdApp({
},
],
},
{
key: 6,
name: '功能类-自动查看原图',
enable: false,
activityIds:
'com.idlefish.flutterbridge.flutterboost.boost.FishFlutterBoostActivity',
rules: [
{
matches: '[desc="查看原图"][visibleToUser=true]',
snapshotUrls: 'https://i.gkd.li/i/15463399',
},
],
},
],
});
12 changes: 8 additions & 4 deletions src/apps/com.taobao.taobao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,17 +164,21 @@ export default defineGkdApp({
},
{
key: 13,
name: '功能类-关闭小额免密支付',
desc: '在支付的时候出现,自动点击关闭和不开通',
name: '功能类-关闭支付相关推荐开通',
desc: '在支付时候出现的小额免密支付,花呗支付等,自动点击关闭和不开通',
enable: false,
quickFind: true,
activityIds: 'com.alipay.android.msp.ui.views.MspContainerActivity',
rules: [
{
key: 0,
name: '类型1',
matches: '@[text="关闭"] < * <3 * < * + * >3 [text$="小额免密支付"]',
snapshotUrls: 'https://i.gkd.li/import/13438414',
matches:
'@[text="关闭"] < FrameLayout -n FrameLayout > [text$="推荐你"]',
snapshotUrls: [
'https://i.gkd.li/import/13438414',
'https://i.gkd.li/i/15520321',
],
},
{
key: 1,
Expand Down
29 changes: 11 additions & 18 deletions src/apps/com.tencent.mobileqq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,10 @@ export default defineGkdApp({
rules: [
{
key: 0,
name: '顶部卡片广告',
matches:
'RelativeLayout[visibleToUser=true] > ImageView[clickable=true] +n RelativeLayout[childCount=2] > ImageView[childCount=0][visibleToUser=true][vid!="pic"][desc="关闭"||desc=null]',
snapshotUrls: [
'https://i.gkd.li/import/12892726',
'https://i.gkd.li/import/12774870',
'https://i.gkd.li/import/13207766',
'https://i.gkd.li/import/13386518',
'https://i.gkd.li/import/13476400',
'https://i.gkd.li/import/14155603',
'https://i.gkd.li/import/14217033',
'https://i.gkd.li/i/14414585', // 误触
'https://i.gkd.li/i/15075866', // 误触
],
},
{
key: 1,
name: '顶部横幅',
matches:
'TextView[text^="当前无法接收"||text="发现QQ版本更新"||text*="礼包"||text*="SVIP"||text*="超级会员"||text*="QQ会员"][childCount=0][visibleToUser=true] <n * > [name$="ImageView"||name$="Button"][desc="关闭"||(desc=null&&text=null)][childCount=0][visibleToUser=true][clickable=true][longClickable=false]',
'ImageView <n * >n TextView[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]',
excludeMatches: '[vid="chat_item_head_icon"]', // 聊天界面头像
snapshotUrls: [
'https://i.gkd.li/import/13426912',
'https://i.gkd.li/import/12706907',
Expand All @@ -72,6 +56,15 @@ export default defineGkdApp({
'https://i.gkd.li/import/13931212',
'https://i.gkd.li/import/14178669',
'https://i.gkd.li/import/14178667',
'https://i.gkd.li/import/12892726',
'https://i.gkd.li/import/12774870',
'https://i.gkd.li/import/13207766',
'https://i.gkd.li/import/13386518',
'https://i.gkd.li/import/13476400',
'https://i.gkd.li/import/14155603',
'https://i.gkd.li/import/14217033',
'https://i.gkd.li/i/14414585', // 误触
'https://i.gkd.li/i/15075866', // 误触
],
},
],
Expand Down
4 changes: 3 additions & 1 deletion src/apps/com.tencent.qqmusic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ export default defineGkdApp({
rules: [
{
key: 1,
quickFind: true,
matches: '[text^="广告"] + [text="跳过"][clickable=true]',
snapshotUrls: 'https://i.gkd.li/i/13985169', // 播放界面
},
{
key: 2,
matches: '[text="广告"] +n [desc="关闭"]',
quickFind: true,
matches: '@[desc="关闭"] -n [text="广告"]',
snapshotUrls: [
'https://i.gkd.li/i/13206534', //歌单页
'https://i.gkd.li/i/13797001', //我的页
Expand Down
5 changes: 3 additions & 2 deletions src/apps/com.xuexiaoyi.xxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default defineGkdApp({
groups: [
{
key: 1,
name: '分段广告-首页底部广告',
name: '分段广告-首页信息流广告',
enable: false,
activityIds: [
'com.xuexiaoyi.entrance.main.MainActivity',
Expand All @@ -18,13 +18,14 @@ export default defineGkdApp({
key: 0,
name: '点击在下方的X',
matches: [
'View[text="广告"] < View <2 View <n View[childCount>4] > View[childCount=1] > Image[text.length=0]', // longClickable=null为了与 key:3 区别防止误触
'[text="广告"] < View <2 View <n View[childCount>4] > View[childCount=1] > Image[text.length=0]',
],
snapshotUrls: [
'https://i.gkd.li/import/13068836',
'https://i.gkd.li/import/13375502',
'https://i.gkd.li/import/13375559',
'https://i.gkd.li/i/14472483',
'https://i.gkd.li/i/15521090',
],
},
{
Expand Down
29 changes: 24 additions & 5 deletions src/apps/com.zmzx.college.search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export default defineGkdApp({
'com.zmzx.college.search.activity.common.CommonCacheHybridActivity',
'com.bytedance.sdk.openadsdk.core.component.reward.activity.TTFullScreenVideoActivity',
'com.bytedance.sdk.openadsdk.stub.activity.Stub_Standard_Portrait_Activity',
'com.bytedance.sdk.openadsdk.core.component.reward.activity.TTFullScreenVideoActivity',
'com.zmzx.college.search.activity.common.DialogWebActivity',
'com.mercury.sdk.activity.InterstitialPortraitActivity',
'com.baidu.mobads.sdk.api.MobRewardVideoActivity',
],
rules: [
{
Expand Down Expand Up @@ -47,6 +47,14 @@ export default defineGkdApp({
},
{
key: 3,
name: '广告-4',
quickFind: true,
matches:
'@ImageView <n RelativeLayout > RelativeLayout > RelativeLayout > [text="反馈"]',
snapshotUrls: 'https://i.gkd.li/i/15521123',
},
{
key: 4,
name: '字节广告',
matches:
'@Image[text.length=0] < View +(3,5) View > View > TextView[text$="广告"]',
Expand All @@ -58,8 +66,8 @@ export default defineGkdApp({
],
},
{
key: 4,
preKeys: [0, 1, 2, 3],
key: 5,
preKeys: [0, 1, 2, 3, 4],
name: '关闭开通会员免广告打扰弹窗',
matches: '@TextView[text.length=0] <n View > [text*="免广告"]',
snapshotUrls: ['https://i.gkd.li/i/15316467'],
Expand All @@ -71,8 +79,19 @@ export default defineGkdApp({
name: '局部广告-信息流广告',
activityIds:
'com.zmzx.college.search.activity.main.activity.MainActivity',
rules: 'ImageView < FrameLayout > FrameLayout[childCount=1] > ImageView',
snapshotUrls: 'https://i.gkd.li/i/15373051',
rules: [
{
key: 0,
matches:
'ImageView < FrameLayout > FrameLayout[childCount=1] > ImageView',
snapshotUrls: 'https://i.gkd.li/i/15373051',
},
{
key: 1,
matches: '[text="广告"] <<n View +n View > Image[text.length=0]',
snapshotUrls: 'https://i.gkd.li/i/15521151',
},
],
},
{
key: 11,
Expand Down

0 comments on commit 7f3a6c0

Please sign in to comment.