Skip to content

Commit

Permalink
feat: 规则维护更新 (#90)
Browse files Browse the repository at this point in the history
* feat(京东): 广告弹窗

* feat(小米应用商店): 忽略升级

* feat(知乎): 首页信息流广告, 回答底部广告

* feat(酷安): 卡片广告

* feat(小米手机管家): 高敏感权限自动确定

* feat(学小易): 首页底部广告

* feat(高德地图): 首页广告卡片

* feat(大学搜题酱): 全屏广告

* feat(知乎): 悬浮广告
  • Loading branch information
aoguai authored Apr 14, 2024
1 parent c344283 commit becb631
Show file tree
Hide file tree
Showing 8 changed files with 108 additions and 63 deletions.
5 changes: 3 additions & 2 deletions src/apps/com.autonavi.minimap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default defineAppConfig({
desc: '关闭首页的所有可关闭的广告卡片',
activityIds: 'com.autonavi.map.activity.NewMapActivity',
rules:
'ViewGroup[index=0][childCount<4] <<2 ViewGroup[childCount<3] > ViewGroup[childCount<5][visibleToUser=true] > ViewGroup + @ViewGroup[index!=0][childCount=1][visibleToUser=true][clickable=true] > ImageView[visibleToUser=true]',
'ScrollView >n ViewGroup[childCount<5][visibleToUser=true] > ViewGroup[childCount>0] + @ViewGroup[index!=0][childCount=1][visibleToUser=true][clickable=true][desc=null||desc="关闭"] > ImageView[visibleToUser=true][desc=null||desc="关闭"]',
snapshotUrls: [
'https://i.gkd.li/import/12642842',
'https://i.gkd.li/import/12642845',
Expand All @@ -40,10 +40,11 @@ export default defineAppConfig({
'https://i.gkd.li/i/14730915',
'https://i.gkd.li/i/14784970',
'https://i.gkd.li/import/12818770', // 限定 ImageView[visibleToUser=true],防止控件不可见时触发规则
'https://i.gkd.li/import/13764540', // 避免在此误触
'https://i.gkd.li/import/13764540', // 误触
'https://i.gkd.li/i/14912831', // 误触
'https://i.gkd.li/i/14912902', // 误触
'https://i.gkd.li/i/14912925', // 误触
'https://i.gkd.li/i/14965850', // 误触
],
},
{
Expand Down
20 changes: 7 additions & 13 deletions src/apps/com.coolapk.market.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default defineAppConfig({
{
key: 0,
name: '分段广告-卡片广告',
desc: '点击卡片右上角按钮->免广告-点击不感兴趣->选择关闭原因-点击不感兴趣',
desc: '点击卡片右上角按钮->免广告-点击关闭->选择关闭原因-点击不感兴趣',
enable: false,
quickFind: true,
activityIds: [
Expand All @@ -21,8 +21,7 @@ export default defineAppConfig({
{
key: 1,
name: '点击右上角x按钮',
matches:
'[id="com.coolapk.market:id/ad_time_view"||id="com.coolapk.market:id/top_text_view"||id="com.coolapk.market:id/ad_text_view"] +n [id="com.coolapk.market:id/close_view"]',
matches: '[id="com.coolapk.market:id/close_view"]',
snapshotUrls: [
'https://i.gkd.li/import/12707506',
'https://i.gkd.li/import/12642094',
Expand All @@ -34,14 +33,16 @@ export default defineAppConfig({
{
preKeys: [1],
key: 2,
name: '去广告/免广告-点击不感兴趣',
matches:
'Button[text$="广告"] <n LinearLayout[childCount=2] > Button[text="不感兴趣"]',
name: '点击[不感兴趣]/[关闭]',
matches: '@[text="不感兴趣" || text="关闭"] <n * > [text*="广告"]',
snapshotUrls: [
'https://i.gkd.li/import/12707509',
'https://i.gkd.li/import/12642132',
'https://i.gkd.li/import/12642155',
'https://i.gkd.li/import/12774753',
'https://i.gkd.li/i/14959519',
'https://i.gkd.li/i/14964859',
'https://i.gkd.li/i/14549551',
],
},
{
Expand All @@ -57,13 +58,6 @@ export default defineAppConfig({
'https://i.gkd.li/import/13786886', // 没有id
],
},
{
preKeys: [1, 2, 3],
key: 4,
name: '选择是否需要今日免广告',
matches: '[text*="免广告"] + [text="不感兴趣"]',
snapshotUrls: ['https://i.gkd.li/i/14549551'],
},
],
},
{
Expand Down
11 changes: 7 additions & 4 deletions src/apps/com.jingdong.app.mall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export default defineAppConfig({
activityIds: [
'com.jingdong.app.mall.MainFrameActivity',
'com.jd.lib.cashier.complete.view.CashierCompleteActivity',
'com.jd.lib.jshop.jshop.JshopMainShopActivity',
],
rules: [
{
Expand All @@ -105,17 +106,19 @@ export default defineAppConfig({
{
key: 1,
quickFind: true,
matches:
'[id="com.jingdong.app.mall:id/webview"] + [id="com.jingdong.app.mall:id/close"][desc="关闭页面"]',
snapshotUrls: 'https://i.gkd.li/import/13218034',
matches: '[vid="webview"] + [vid="close"][desc="关闭页面"]',
snapshotUrls: [
'https://i.gkd.li/import/13218034',
'https://i.gkd.li/i/14927060',
],
},
{
key: 2,
matches:
'[id="android:id/content"] > RelativeLayout > RelativeLayout > *[childCount=2] > ImageView[index=1][clickable=true]',
snapshotUrls: [
'https://i.gkd.li/import/13241883',
'https://i.gkd.li/import/132599029',
'https://i.gkd.li/import/13259029',
'https://i.gkd.li/i/14612925',
],
},
Expand Down
29 changes: 26 additions & 3 deletions src/apps/com.miui.securitycenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ export default defineAppConfig({
name: '小米手机管家',
groups: [
{
enable: false,
key: 10,
name: '功能类-自动继续安装',
desc: 'USB安装应用,点击继续安装',
enable: false,
quickFind: true,
activityIds: 'com.miui.permcenter.install.AdbInstallActivity',
rules: [
Expand All @@ -19,10 +19,10 @@ export default defineAppConfig({
],
},
{
enable: false,
key: 11,
name: '功能类-禁止获取定位',
desc: '关闭【允许联网及定位】后,每次打开手机管家都会出现',
enable: false,
quickFind: true,
activityIds: [
'com.miui.securityscan.MainActivity', // app版本v8
Expand All @@ -42,10 +42,10 @@ export default defineAppConfig({
],
},
{
enable: false,
key: 12,
name: '功能类-忽略体检分数',
desc: '退出时忽略体检优化分数',
enable: false,
quickFind: true,
activityIds: 'com.miui.securityscan.MainActivity',
rules: [
Expand All @@ -61,5 +61,28 @@ export default defineAppConfig({
},
],
},
{
key: 13,
name: '功能类-高敏感权限自动确定',
desc: '勾选[我已知晓可能存在的风险]-10s后点击[确定]',
enable: false,
quickFind: true,
activityIds:
'com.miui.permcenter.privacymanager.SpecialPermissionInterceptActivity',
rules: [
{
key: 0,
matches:
'@[checked=false] + [text="我已知晓可能存在的风险,并自愿承担可能导致的后果"]',
snapshotUrls: 'https://i.gkd.li/i/14965657',
},
{
preKeys: [0],
key: 1,
matches: '[text="确定"]',
snapshotUrls: 'https://i.gkd.li/i/14965656',
},
],
},
],
});
23 changes: 13 additions & 10 deletions src/apps/com.xiaomi.market.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ export default defineAppConfig({
snapshotUrls: 'https://i.gkd.li/import/13197334',
},
{
enable: false,
key: 10,
name: '功能类-忽略升级',
quickFind: true,
desc: '应用升级界面-自动点击忽略',
exampleUrls:
'https://github.com/gkd-kit/subscription/assets/45487685/a3a61df9-7757-428e-b4fe-a960e09a0bbe',
quickFind: true,
enable: false,
activityIds: 'com.xiaomi.market.ui.UpdateListActivity',
rules: [
{
Expand All @@ -39,16 +37,21 @@ export default defineAppConfig({
},
{
key: 1,
matches:
'[id="com.xiaomi.market:id/expandable_textview"] + [id="com.xiaomi.market:id/expand_button"][desc="更多"]',
snapshotUrls: 'https://i.gkd.li/import/12674264',
matches: '[vid="expand_button"][visibleToUser=true]',
excludeMatches: '[text="忽略本次"][visibleToUser=true]',
snapshotUrls: [
'https://i.gkd.li/import/12674264',
'https://i.gkd.li/i/14931577',
],
},
{
preKeys: [1],
key: 2,
matches:
'@[id="com.xiaomi.market:id/ignore_this"][text="忽略本次"] + [id="com.xiaomi.market:id/ignore_permanently"][text="永久忽略"]',
snapshotUrls: 'https://i.gkd.li/import/12674269',
matches: '[text="忽略本次"][visibleToUser=true]',
snapshotUrls: [
'https://i.gkd.li/import/12674269',
'https://i.gkd.li/i/14931578',
],
},
],
},
Expand Down
12 changes: 11 additions & 1 deletion src/apps/com.xuexiaoyi.xxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default defineAppConfig({
activityIds: [
'com.xuexiaoyi.entrance.main.MainActivity',
'com.xuexiaoyi.platform.base.arch.RouterFragmentActivity',
'com.bytedance.sdk.openadsdk.stub.activity.Stub_Standard_Activity_T',
],
rules: [
{
Expand Down Expand Up @@ -60,13 +61,22 @@ export default defineAppConfig({
],
},
{
preKeys: [0, 1, 2, 3],
key: 4,
name: '点击[反馈]',
matches:
'[text="广告"][visibleToUser=true] < * <n View +n [text="反馈"][visibleToUser=true]',
snapshotUrls: ['https://i.gkd.li/i/14965789'],
},
{
preKeys: [0, 1, 2, 3, 4],
key: 10,
name: '点击不感兴趣',
quickFind: true,
matches: 'TextView[text="不感兴趣"]',
snapshotUrls: [
'https://i.gkd.li/import/13068819',
'https://i.gkd.li/import/13457380',
'https://i.gkd.li/i/14965790',
],
},
],
Expand Down
62 changes: 34 additions & 28 deletions src/apps/com.zhihu.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default defineAppConfig({
groups: [
{
key: 6,
name: '分段广告-信息流广告',
name: '分段广告-首页信息流广告',
desc: '点击关闭-点击内容不感兴趣',
enable: false,
quickFind: true,
Expand All @@ -17,15 +17,12 @@ export default defineAppConfig({
'com.zhihu.android.app.ui.activity.HostActivity',
'com.zhihu.android.feature.short_container_feature.ui.ShortContainerHostActivity',
'com.zhihu.android.ContentActivity',
'com.zhihu.android.app.ui.activity.MainActivity',
],
rules: [
{
key: 0,
matches:
'@ImageView[id=null][clickable=true] -n TextView[text=null] <<n * <n * > * >n [text$="广告"][visibleToUser=true]',
exampleUrls:
'https://m.gkd.li/57941037/f6498773-af55-4ba9-96fa-4c0597523d55',
snapshotUrls: [
'https://i.gkd.li/import/13849671',
'https://i.gkd.li/import/12647525',
Expand All @@ -47,17 +44,22 @@ export default defineAppConfig({
},
{
key: 2,
matches:
'[text*="广告"] <<n [vid="bottom_container"] > [vid="menu_container"] > [vid="menu"][visibleToUser!=false]',
matches: '@[vid="menu"][visibleToUser=true] < * - * > [text^="广告"]',
snapshotUrls: [
'https://i.gkd.li/import/14321041',
'https://i.gkd.li/import/14296163',
'https://i.gkd.li/i/14468152',
'https://i.gkd.li/i/14558110', // 防误触
],
},
{
key: 3,
matches: '@ViewGroup[clickable=true] <3 * < * -2 * >2 [text$="广告"]',
snapshotUrls: 'https://i.gkd.li/import/14332161',
},
{
key: 90,
preKeys: [0, 1, 2],
preKeys: [0, 1, 2, 3],
matches: '@[clickable=true] >3 [text$="不感兴趣"]',
snapshotUrls: 'https://i.gkd.li/import/13849689',
},
Expand All @@ -67,11 +69,11 @@ export default defineAppConfig({
key: 11,
name: '全屏广告-广告弹窗',
desc: '点击关闭',
quickFind: true,
activityIds: [
'com.zhihu.android.app.ui.activity.MainActivity',
'com.zhihu.android.app.ui.activity.AdAlphaVideoActivity',
],
quickFind: true,
rules: [
{
key: 0,
Expand All @@ -95,7 +97,7 @@ export default defineAppConfig({
},
{
key: 14,
name: '局部广告-信息流广告',
name: '局部广告-回答底部广告',
desc: '点击关闭',
activityIds: [
'com.zhihu.android.feature.short_container_feature.ui.ShortContainerHostActivity',
Expand All @@ -105,45 +107,49 @@ export default defineAppConfig({
{
key: 0,
matches:
'@[name$=".ImageView"||name$=".Image"][clickable=true] <n * > [text$="广告"||text="创作者小助手"||text="知乎游戏"]',
exampleUrls:
'https://m.gkd.li/57941037/0443d5cb-aa24-4447-afd7-58c5a09af835',
'@[name$=".ImageView"||name$=".Image"||text="×"][clickable=true] <n * > [text$="广告"||text="创作者小助手"||text^="知乎"][clickable=false][text.length<20]',
snapshotUrls: [
'https://i.gkd.li/import/14178980',
'https://i.gkd.li/import/14206949',
'https://i.gkd.li/import/14232195', // text="创作者小助手"
'https://i.gkd.li/import/14235024', // text="知乎游戏"
'https://i.gkd.li/i/14944631', // text="知乎问题商店"
'https://i.gkd.li/i/14391614',
'https://i.gkd.li/i/14548763',
'https://i.gkd.li/i/14220104',
'https://i.gkd.li/i/14421277',
],
},
{
key: 2,
quickFind: true,
matches: '@[vid="menu"][visibleToUser=true] < * - * > [text^="广告"]',
snapshotUrls: 'https://i.gkd.li/import/14296163',
},
{
key: 3,
activityIds: 'com.zhihu.android.app.ui.activity.MainActivity',
quickFind: true,
matches: '@ViewGroup[clickable=true] <3 * < * -2 * >2 [text$="广告"]',
snapshotUrls: 'https://i.gkd.li/import/14332161',
},
],
},
{
key: 15,
name: '局部广告-悬浮小广告',
name: '局部广告-悬浮广告',
quickFind: true,
activityIds: [
'com.zhihu.android.app.ui.activity.MainActivity',
'com.zhihu.android.feature.short_container_feature.ui.ShortContainerHostActivity',
],
rules: [
{
key: 0,
name: '发现页面-右侧年卡折扣悬浮窗',
activityIds: 'com.zhihu.android.app.ui.activity.MainActivity',
quickFind: true,
matches: '@[vid="activity_close"] + * > [vid="activity_img"]',
snapshotUrls: 'https://i.gkd.li/import/14296251',
},
{
key: 1,
name: '首页-右侧悬浮窗广告',
matches:
'@ImageView[clickable=true][visibleToUser=true] + * >2 [text="广告"]',
snapshotUrls: 'https://i.gkd.li/i/14635636',
},
{
key: 2,
name: '回答页-底部关注悬浮窗',
matches: '[vid="close_img"]',
snapshotUrls: 'https://i.gkd.li/i/14970008',
},
],
},
{
Expand Down
Loading

0 comments on commit becb631

Please sign in to comment.