forked from gkd-kit/subscription
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtv.danmaku.bili.ts
217 lines (216 loc) · 6.91 KB
/
tv.danmaku.bili.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
import { defineAppConfig } from '../types';
export default defineAppConfig({
id: 'tv.danmaku.bili',
name: '哔哩哔哩',
deprecatedKeys: [3, 5],
groups: [
{
key: -1,
name: '开屏广告',
desc: '开屏广告,任意界面切回APP开屏广告',
quickFind: true,
matchTime: 10000,
actionMaximum: 1,
resetMatch: 'app',
rules: '[id="tv.danmaku.bili:id/count_down"][text^="跳"]',
snapshotUrls: 'https://i.gkd.li/import/12705270',
},
{
key: 0,
name: '评论区顶部公告横幅',
quickFind: true,
excludeActivityIds: [
'com.bilibili.bililive.room.ui.roomv3.LiveRoomActivityV3', // 直播间
'tv.danmaku.bili.MainActivityV2', // 主页
],
rules:
'LinearLayout[id=`tv.danmaku.bili:id/ad_tint_frame`] > ImageView[id="tv.danmaku.bili:id/close"][desc=`关闭`]',
snapshotUrls: [
'https://i.gkd.li/import/12785461',
'https://i.gkd.li/import/12775156',
],
},
{
key: 1,
name: '青少年模式弹窗',
quickFind: true,
matchTime: 10000,
actionMaximum: 1,
resetMatch: 'app',
rules: 'TextView[text*="青少年模式"] +n TextView[text="我知道了"]',
snapshotUrls: 'https://i.gkd.li/import/13746766',
},
{
key: 2,
name: '动态推荐广告卡片',
desc: '点击卡片右上角[广告]按钮-点击不感兴趣',
quickFind: true,
matchDelay: 5000,
activityIds: 'tv.danmaku.bili.MainActivityV2',
rules: [
{
key: 1,
matches: '[id=`tv.danmaku.bili:id/ad_goods_mark_big`]',
snapshotUrls: 'https://i.gkd.li/import/12700222',
},
{
preKeys: 1,
matches: '[text="不感兴趣"][id^="tv.danmaku.bili:id/reason"]',
snapshotUrls: 'https://i.gkd.li/import/12700243',
},
],
},
// key = 3已弃用
{
enable: false,
key: 4,
name: '视频底部与评论区中间卡片式广告',
desc: '需点击二次弹窗 屏蔽原因',
quickFind: true,
activityIds: [
'com.bilibili.video.videodetail.VideoDetailsActivity',
'com.bilibili.ship.theseus.all.UnitedBizDetailsActivity',
'com.bilibili.ship.theseus.detail.UnitedBizDetailsActivity',
],
rules: [
{
key: 0,
name: '点击广告卡片右侧菜单图标',
matches:
'FrameLayout[id="tv.danmaku.bili:id/ad_tint_frame"] >n [id^="tv.danmaku.bili:id/more"]',
snapshotUrls: [
'https://i.gkd.li/import/12642260', // n = 2
'https://i.gkd.li/import/12705266', // n = 3
'https://i.gkd.li/import/12776568', // id="tv.danmaku.bili:id/more_layout"
'https://i.gkd.li/import/12707070', // 由于 activityId 切换延迟导致规则仍然运行, 使用 FrameLayout 避免误触
],
},
{
preKeys: 0,
key: 1,
name: '点击屏蔽广告',
matches:
'[id="tv.danmaku.bili:id/dislike_reasons"] @RelativeLayout > [text*="不感兴趣"]',
snapshotUrls: [
'https://i.gkd.li/import/12642261', // 屏蔽广告菜单弹窗
'https://i.gkd.li/import/13495649',
],
},
],
},
// key = 5已弃用
{
key: 6,
name: '更新弹窗',
quickFind: true,
actionMaximum: 1,
matchDelay: 5000,
activityIds: [
'com.bilibili.app.preferences.BiliPreferencesActivity',
'tv.danmaku.bili.ui.splash.ad.page.HotSplashActivity',
'tv.danmaku.bili.MainActivityV2',
],
rules: [
{
key: 1,
matches: '[id="tv.danmaku.bili:id/update_btn_cancel"]',
snapshotUrls: [
'https://i.gkd.li/import/12649689', // com.bilibili.app.preferences.BiliPreferencesActivity
'https://i.gkd.li/import/13212209', // tv.danmaku.bili.ui.splash.ad.page.HotSplashActivity
'https://i.gkd.li/import/13228977',
'https://i.gkd.li/import/13334963',
],
},
],
},
{
key: 7,
name: '视频悬浮广告',
desc: '领取大会员月卡,B站免流星卡',
quickFind: true,
matchTime: 10000,
actionMaximum: 1,
activityIds: [
'com.bilibili.ship.theseus.detail.UnitedBizDetailsActivity',
'com.bilibili.video.videodetail.VideoDetailsActivity',
],
rules: ['[id="tv.danmaku.bili:id/toast_x"]'],
snapshotUrls: [
'https://i.gkd.li/import/12892611',
'https://i.gkd.li/import/13308344',
'https://i.gkd.li/import/13538048', // activityIds: 'com.bilibili.video.videodetail.VideoDetailsActivity',
],
exampleUrls: [
'https://github.com/gkd-kit/inspect/assets/38517192/110db806-3f8b-4cd2-a445-06c5f5eb21eb',
],
},
{
key: 8,
name: '直播间卡片广告',
desc: '直播间底部售卖卡片-点击右上角x',
quickFind: true,
matchTime: 10000,
actionMaximum: 1,
activityIds: 'com.bilibili.bililive.room.ui.roomv3.LiveRoomActivityV3',
rules: '[id="tv.danmaku.bili:id/shopping_close"]',
snapshotUrls: 'https://i.gkd.li/import/13200549',
},
{
enable: false,
key: 9,
name: '请求通知权限弹窗',
quickFind: true,
matchTime: 10000,
actionMaximum: 1,
resetMatch: 'app',
activityIds: [
'tv.danmaku.bili.MainActivityV2',
'com.bilibili.video.story.StoryTransparentActivity',
],
rules: '[text$="通知"] +2 * > [id="tv.danmaku.bili:id/close"]',
snapshotUrls: [
'https://i.gkd.li/import/13229159',
'https://i.gkd.li/import/13614090',
],
},
{
enable: false,
key: 10,
name: '首页-推荐视频卡片广告', // 流程与 key=4 视频底部广告 基本一致
quickFind: true,
activityIds: 'tv.danmaku.bili.MainActivityV2',
rules: [
{
key: 0,
name: '点击广告卡片右下角菜单按钮',
matches:
'[id="tv.danmaku.bili:id/ad_tint_frame"] [id="tv.danmaku.bili:id/more"]',
snapshotUrls: 'https://i.gkd.li/import/13256570',
},
{
preKeys: 0,
key: 1,
name: '点击[不感兴趣]',
matches: '@RelativeLayout > [text$="不感兴趣"]',
snapshotUrls: [
'https://i.gkd.li/import/13256605',
'https://i.gkd.li/import/13625309',
'https://i.gkd.li/import/13742257',
],
},
],
},
{
key: 11,
name: '个性化内容推荐弹窗',
quickFind: true,
matchTime: 10000,
actionMaximum: 1,
resetMatch: 'app',
activityIds: 'tv.danmaku.bili.MainActivityV2',
rules:
'[text="开启个性化内容推荐"] +3 [id="tv.danmaku.bili:id/close_button"]',
snapshotUrls: 'https://i.gkd.li/import/13448905',
},
],
});