diff --git a/src/apps/com.baidu.tieba.ts b/src/apps/com.baidu.tieba.ts index 84ad6aec..36b49b2a 100644 --- a/src/apps/com.baidu.tieba.ts +++ b/src/apps/com.baidu.tieba.ts @@ -13,19 +13,29 @@ export default defineAppConfig({ 'com.baidu.tieba.pb.pb.main.PbActivity', ], rules: [ - 'TextView[text*=`广告`] - TextView[text^=`跳过`]', - '[id=`com.kwad.dy.sdk:id/ksad_splash_circle_skip_view`] TextView[text=`跳过`]', - '[id=`com.byted.pangle:id/tt_splash_skip_btn`]', { + key: 0, + matches: + '[id="com.kwad.dy.sdk:id/ksad_splash_circle_skip_view"] TextView[text="跳过"]', // 需要补充快照 + }, + { key: 1, matches: '[id="com.byted.pangle:id/tt_splash_skip_btn"]' }, // 需要补充快照 + { + key: 2, + matches: 'TextView[text*="广告"] - TextView[text^="跳过"]', + snapshotUrls: 'https://gkd-kit.songe.li/import/12775906', + }, + { + key: 3, matches: '@TextView[text="跳过"] + TextView[text.length=1]', - snapshotUrls: 'https://gkd-kit.gitee.io/import/12566191', + snapshotUrls: ['https://gkd-kit.gitee.io/import/12566191'], }, ], }, { key: 1, name: '任意界面-选择不喜欢理由-不感兴趣', - rules: '@View[text=null] - TextView[text=`选择不喜欢理由`][index=0]', + rules: '@View[text=null] - TextView[text="选择不喜欢理由"][index=0]', + snapshotUrls: 'https://gkd-kit.songe.li/import/12775914', }, { key: 2, @@ -35,7 +45,12 @@ export default defineAppConfig({ 'com.baidu.tieba.frs.FrsActivity', ], rules: [ - 'ImageView < @FrameLayout < LinearLayout < RelativeLayout RelativeLayout > TextView[text$=`广告`]', + { + key: 0, + matches: + 'TextView[text$="广告"] < RelativeLayout LinearLayout > FrameLayout +n RelativeLayout > LinearLayout', + snapshotUrls: 'https://gkd-kit.songe.li/import/12775930', + }, ], }, { @@ -47,23 +62,37 @@ export default defineAppConfig({ 'com.baidu.tieba.pb.pb.main.PbActivity', ], rules: - 'TextView[text=`广告`] ImageView', - }, - { - key: 4, - name: '帖子评论区内部广告卡片', - activityIds: 'com.baidu.tieba.frs.FrsActivity', - rules: - 'ImageView < @FrameLayout < LinearLayout < RelativeLayout ImageView', // 需要补充快照 }, + // key=4 的规则组已经删除, 后续不可添加 key=4 的规则组 { key: 5, name: '帖子评论区广告卡片', - activityIds: 'com.baidu.tieba.pb.pb.main.PbActivity', + activityIds: [ + 'com.baidu.tieba.pb.pb.main.PbActivity', + 'com.baidu.tieba.frs.FrsActivity', + ], rules: [ - 'TextView[text=`广告`] n ImageView', + }, + { + key: 1, + matches: + 'TextView[text$="广告"] +n FrameLayout[id="com.baidu.tieba:id/obfuscated"] >n ImageView[id=null]', + snapshotUrls: 'https://gkd-kit.songe.li/import/12775913', + }, + { + key: 2, + matches: + 'TextView[text$="广告"] < RelativeLayout n @FrameLayout > ImageView[id=null][desc=null]', + snapshotUrls: [ + 'https://gkd-kit.songe.li/import/12775916', + 'https://gkd-kit.songe.li/import/12775892', // 指定点击目标为具备 clickable=true 属性的 @FrameLayout,防止在这个快照误触点击收藏 + ], + }, ], }, { @@ -81,5 +110,13 @@ export default defineAppConfig({ rules: '[text="稍后再说"]', snapshotUrls: 'https://gkd-kit.gitee.io/import/12496934', }, + { + key: 8, + name: '帖子底部广告卡片', + activityIds: 'com.baidu.tieba.pb.pb.main.PbActivity', + rules: + 'LinearLayout > RelativeLayout > ImageView[id=null][clickable=true]', + snapshotUrls: 'https://gkd-kit.songe.li/import/12775882', + }, ], });