Skip to content

Commit

Permalink
feat(全局规则): 局部广告 (#40)
Browse files Browse the repository at this point in the history
* feat(全局规则): 局部广告

* chore: 删除冗余规则与文档, 完善全局规则-局部广告
  • Loading branch information
aoguai committed Feb 12, 2024
1 parent 6ca2fd7 commit 0c64c44
Show file tree
Hide file tree
Showing 20 changed files with 136 additions and 362 deletions.
9 changes: 0 additions & 9 deletions docs/com.android.quicksearchbox.md

This file was deleted.

9 changes: 0 additions & 9 deletions docs/com.csair.mbp.md

This file was deleted.

9 changes: 0 additions & 9 deletions docs/com.xiaomi.hm.health.md

This file was deleted.

2 changes: 1 addition & 1 deletion src/apps/cn.wps.moffice_eng.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default defineAppConfig({
},
{
key: 5,
name: '局部广告-文档末尾广告',
name: '分段广告-文档末尾广告',
activityIds: [
'cn.wps.moffice.writer.multiactivity.Writer', //Writer1,Writer2...
],
Expand Down
18 changes: 0 additions & 18 deletions src/apps/com.android.quicksearchbox.ts

This file was deleted.

8 changes: 0 additions & 8 deletions src/apps/com.android.thememanager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ export default defineAppConfig({
id: 'com.android.thememanager',
name: 'miui主题壁纸',
groups: [
{
key: 1,
name: '局部广告-主题详情底部广告',
desc: '注意如果使用ADB禁用了MIUI广告组件,点击此按钮会无反应,可关闭此规则,避免过多相同点击记录',
rules:
'[id="com.android.thememanager:id/ad_close_btn"][visibleToUser=true]',
snapshotUrls: 'https://i.gkd.li/import/13227330',
},
{
key: 2,
name: '局部广告-广告弹窗',
Expand Down
31 changes: 1 addition & 30 deletions src/apps/com.baidu.netdisk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({
id: 'com.baidu.netdisk',
name: '百度网盘',
deprecatedKeys: [0, 3, 6, 8, 10, 11],
deprecatedKeys: [0, 2, 3, 4, 6, 8, 10, 11],
groups: [
{
key: 1,
Expand All @@ -22,35 +22,6 @@ export default defineAppConfig({
'https://i.gkd.li/import/12783106', // 看视频免费享极速下载弹窗
],
},
{
key: 2,
name: '局部广告-首页广告',
desc: '关闭首页各种广告信息',
activityIds: 'com.baidu.netdisk.ui.MainActivity',
quickFind: true,
rules: [
{
key: 1,
name: 'banner广告',
matches: '[id="com.baidu.netdisk:id/banner_item_close"]',
snapshotUrls: 'https://i.gkd.li/import/12706544',
},
{
key: 2,
name: '热门广告',
matches: '[id="com.baidu.netdisk:id/close"]',
snapshotUrls: ['https://i.gkd.li/import/12706544'],
},
],
},
{
key: 4,
name: '局部广告-我的页面-限时福利',
activityIds: 'com.baidu.netdisk.ui.MainActivity',
quickFind: true,
rules: '@TextView + [text="专属福利"]',
snapshotUrls: 'https://i.gkd.li/import/12706549',
},
{
key: 5,
name: '局部广告-相册页面-激活无限空间弹窗',
Expand Down
16 changes: 0 additions & 16 deletions src/apps/com.csair.mbp.ts

This file was deleted.

29 changes: 1 addition & 28 deletions src/apps/com.miui.player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,8 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({
id: 'com.miui.player',
name: '小米音乐',
deprecatedKeys: [4, 5, 10],
deprecatedKeys: [1, 2, 4, 5, 10],
groups: [
{
key: 1,
name: '局部广告-浮窗广告',
desc: '关闭右侧飘窗广告, 包括首页和播放页面',
quickFind: true,
activityIds:
'com.tencent.qqmusiclite.activity.player.MusicPlayerActivity',
rules:
'[id$="free_mode_tips_layout"||id$="iv_main_floating_promote"] + [id$="iv_close"]',
snapshotUrls: [
'https://i.gkd.li/import/13303283',
'https://i.gkd.li/import/13562649',
],
},
{
key: 2,
name: '局部广告-横幅广告',
desc: '关闭播放页面横幅广告',
quickFind: true,
activityIds:
'com.tencent.qqmusiclite.activity.player.MusicPlayerActivity',
rules: '[id="com.miui.player:id/ad_skip_text"][text="关闭"]',
snapshotUrls: [
'https://i.gkd.li/import/13304347', // 倒计时
'https://i.gkd.li/import/13304344', // 可关闭
],
},
{
key: 3,
name: '全屏广告-弹窗广告',
Expand Down
6 changes: 0 additions & 6 deletions src/apps/com.mosoink.teach.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ export default defineAppConfig({
'https://m.gkd.li/64072399/69bb91ee-5367-4819-94d7-90e357dd9d3c',
snapshotUrls: 'https://i.gkd.li/import/13784406', //极少触发
},
{
matches: '[id$="/iv_close"]',
exampleUrls:
'https://m.gkd.li/64072399/695871fb-9c73-4c93-a6d1-18d90786604a',
snapshotUrls: 'https://i.gkd.li/import/13778123',
},
],
},
],
Expand Down
2 changes: 1 addition & 1 deletion src/apps/com.tencent.mobileqq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ export default defineAppConfig({
},
{
key: 20,
name: '局部广告-钱包-卡片广告',
name: '分段广告-钱包-卡片广告',
quickFind: true,
activityIds: 'com.tencent.mobileqq.activity.SplashActivity',
rules: [
Expand Down
17 changes: 1 addition & 16 deletions src/apps/com.unionpay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({
id: 'com.unionpay',
name: '云闪付',
deprecatedKeys: [1, 10, 11, 12],
deprecatedKeys: [1, 9, 10, 11, 12],
groups: [
{
key: 2,
Expand All @@ -25,21 +25,6 @@ export default defineAppConfig({
},
],
},
{
key: 9,
name: '局部广告-右侧悬浮广告',
actionMaximum: 1,
resetMatch: 'app',
quickFind: true,
activityIds: ['com.unionpay.activity.UPActivityMain'],
rules: [
{
matches:
'[id="com.unionpay:id/frog_float"] >2 [id="com.unionpay:id/close_view"][visibleToUser=true]',
snapshotUrls: 'https://i.gkd.li/import/12695699',
},
],
},
{
key: 13,
name: '全屏广告-天天签到-获得新勋章提示',
Expand Down
16 changes: 0 additions & 16 deletions src/apps/com.xiaomi.hm.health.ts

This file was deleted.

13 changes: 1 addition & 12 deletions src/apps/com.xiaomi.market.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({
id: 'com.xiaomi.market',
name: '小米应用商店',
deprecatedKeys: [11],
deprecatedKeys: [11, 12],
groups: [
{
key: 0,
Expand Down Expand Up @@ -57,16 +57,5 @@ export default defineAppConfig({
},
],
},
{
key: 12,
name: '局部广告-个性化推荐弹窗',
quickFind: true,
matchTime: 10000,
actionMaximum: 1,
resetMatch: 'app',
activityIds: 'com.xiaomi.market.business_ui.main.MarketTabActivity',
rules: '[id="com.xiaomi.market:id/close_float_recommend"]',
snapshotUrls: 'https://i.gkd.li/import/13624971',
},
],
});
16 changes: 1 addition & 15 deletions src/apps/com.xyhui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({
id: 'com.xyhui',
name: 'PU口袋校园',
deprecatedKeys: [3, 4],
deprecatedKeys: [2, 3, 4],
groups: [
{
key: 1,
Expand Down Expand Up @@ -97,19 +97,5 @@ export default defineAppConfig({
},
],
},
{
key: 2,
name: '局部广告-首页-右侧浮窗广告',
quickFind: true,
activityIds: [
'com.xyhui.start.PUMainActivity',
'com.xyhui.start.LoadingActivity',
],
rules: 'ImageView[id="com.xyhui:id/deleteIv"]',
snapshotUrls: [
'https://i.gkd.li/import/12846543',
'https://i.gkd.li/import/12868119',
],
},
],
});
10 changes: 1 addition & 9 deletions src/apps/com.yitong.mbank.psbc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { defineAppConfig } from '../types';

export default defineAppConfig({
id: 'com.yitong.mbank.psbc',
deprecatedKeys: [1],
deprecatedKeys: [1, 3],
name: '邮储银行',
groups: [
{
Expand All @@ -14,13 +14,5 @@ export default defineAppConfig({
'[id="com.yitong.mbank.psbc:id/iv_theme"] + [id="com.yitong.mbank.psbc:id/iv_theme_close_btn"]',
snapshotUrls: 'https://i.gkd.li/import/12755516',
},
{
key: 3,
name: '局部广告-首页-浮窗广告',
activityIds:
'com.yitong.mbank.psbc.module.home.view.activity.MainActivity',
rules: '[id="com.yitong.mbank.psbc:id/img_close_float_window"]',
snapshotUrls: 'https://i.gkd.li/import/13797314',
},
],
});
23 changes: 0 additions & 23 deletions src/apps/com.zhihu.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,17 +135,6 @@ export default defineAppConfig({
'TextView[text$=`的广告`] +n TextView[text=`×`][visibleToUser=true]',
snapshotUrls: 'https://i.gkd.li/import/12864109',
},
{
key: 2,
activityIds: [
'com.zhihu.android.mix.activity.ContentMixProfileActivity',
],
matches: 'TextView[text="查看详情"] + TextView[text="×"]',
snapshotUrls: [
'https://i.gkd.li/import/12647617',
'https://i.gkd.li/import/12647659', // 点击x按钮后的快照,界面无任何变化,导致反复触发这条规则
],
},
{
key: 3,
matches: 'TextView[text*=`赞同`][text*=`评论`] + TextView[text=`×`]',
Expand All @@ -154,22 +143,10 @@ export default defineAppConfig({
key: 4,
matches: 'TextView[text*=`回答`][text*=`关注`] + TextView[text=`×`]',
},
// 存在误触,缺乏快照处置,暂时移除
// 误触快照:https://i.gkd.li/import/13196039
// {
// key: 5,
// matches:
// 'TextView[text!=null] + TextView[text*=`赞同`] + View > Image',
// },
{
key: 6,
matches: 'TextView[text$=`的广告`] - Image[id=null]',
},
// {
// key: 7,
// matches: 'TextView[text*=`广告`] +2 Image[id=null]', // 1687338556331
// 误触 https://i.gkd.li/import/13332447, 原规则没有快照无法debug, 先关闭
// },
{
key: 8,
matches: 'TextView[text*=`点赞`][text*=`的回答`] +2 Image[id=null]', // 1687076663768 1686969672948
Expand Down
Loading

0 comments on commit 0c64c44

Please sign in to comment.