Skip to content

Commit

Permalink
feat: 优化规则 (#43)
Browse files Browse the repository at this point in the history
* fix(酷安): 开屏广告

* fix: 移除 无效quickFind 字段, 全局规则覆盖的APP规则

* feat(知乎): 分段广告

* feat(百度网盘): 评价提示

* fix(知乎): 信息流广告

* feat(邮储银行): 首页广告弹窗

* feat(小米音乐): 我的页面顶部 banner 广告

* fix(微博轻享版): 信息流广告

* feat(智能服务): miui-为什么不希望看到这条推广

* feat(海南航空): 首页弹窗广告

* feat(高德地图): 消息提醒, 加油页面优惠券弹窗

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

* feat(百度网盘): 活动弹窗

* feat(百度贴吧): 申请消息提醒弹窗

* feat: 全局规则优化

* fix: 全局规则优化
  • Loading branch information
aoguai committed Feb 18, 2024
1 parent bca09c9 commit b76f2ec
Show file tree
Hide file tree
Showing 18 changed files with 76 additions and 157 deletions.
9 changes: 0 additions & 9 deletions docs/com.bilibili.studio.md

This file was deleted.

1 change: 0 additions & 1 deletion src/apps/cn.com.spdb.mobilebank.per.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export default defineAppConfig({
name: '通知提示-消息中心-系统通知请求',
desc: '自动点击关闭。',
enable: false,
quickFind: true,
actionMaximum: 1, // 限制只能点击一次
resetMatch: 'app',
activityIds:
Expand Down
4 changes: 3 additions & 1 deletion src/apps/com.autonavi.minimap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export default defineAppConfig({
key: 10,
name: '通知提示-首页地图页面上方消息提醒',
enable: false,
quickFind: true,
activityIds: 'com.autonavi.map.activity.NewMapActivity',
rules:
'RelativeLayout[desc="弹窗"] > [id="com.autonavi.minimap:id/msgbox_popup_clear"]',
Expand All @@ -44,9 +45,10 @@ export default defineAppConfig({
key: 12,
name: '全屏广告-加油页面优惠券弹窗',
enable: false,
quickFind: true,
activityIds: 'com.autonavi.map.activity.NewMapActivity',
rules:
'@ImageView < [desc="关闭"][clickable=true] - ViewGroup > ViewGroup > ViewGroup > View[text="立即领取"]',
'@ImageView < [desc="关闭"][clickable=true] <n * > * >n View[text="立即领取"]',
snapshotUrls: ['https://i.gkd.li/import/12642857'],
},
],
Expand Down
1 change: 1 addition & 0 deletions src/apps/com.baidu.netdisk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default defineAppConfig({
name: '全屏广告-活动弹窗',
desc: '关闭各种活动弹窗信息',
enable: false,
quickFind: true,
activityIds: [
'com.baidu.netdisk.ui.MainActivity',
'com.baidu.netdisk.business.guide.dialog.lifeproduct.',
Expand Down
48 changes: 12 additions & 36 deletions src/apps/com.baidu.tieba.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,13 @@ import { defineAppConfig } from '../types';
export default defineAppConfig({
id: 'com.baidu.tieba',
name: '百度贴吧',
deprecatedKeys: [4, 7],
deprecatedKeys: [0, 4, 7],
groups: [
{
key: 0,
name: '开屏广告',
matchTime: 10000,
actionMaximum: 1,
resetMatch: 'app',
rules: [
{
key: 0,
quickFind: true,
name: '【跳过+倒计时】型',
matches: 'TextView[text^="跳过"][text.length<=10]',
snapshotUrls: [
'https://i.gkd.li/import/12775906',
'https://i.gkd.li/import/12566191',
'https://i.gkd.li/import/12870916',
'https://i.gkd.li/import/13233500',
],
},
{
key: 1,
name: '【圆圈跳过】型-来自穿山甲SDK',
matches: '[id="com.byted.pangle:id/tt_splash_skip_btn"]',
snapshotUrls: 'https://i.gkd.li/import/13322227',
},
{
key: 2,
quickFind: true,
name: '【x+关闭】型',
matches:
'TextView[text="广告"] - @LinearLayout[clickable=true] > [text="关闭"]',
snapshotUrls: 'https://i.gkd.li/import/13168386',
},
],
},
{
key: 1,
name: '权限提示-申请消息提醒弹窗',
enable: false,
quickFind: true,
actionMaximum: 1,
resetMatch: 'app',
rules: [
Expand Down Expand Up @@ -114,6 +80,16 @@ export default defineAppConfig({
},
],
},
{
key: 5,
name: '评价提示',
enable: false,
quickFind: true,
actionMaximum: 1,
resetMatch: 'app',
rules: '[text="喜欢“百度网盘”吗?"] +n [vid="tv_left_btn"]',
snapshotUrls: 'https://i.gkd.li/import/14317054',
},
{
key: 8,
name: '分段广告-帖子底部内容推荐卡片',
Expand Down
34 changes: 0 additions & 34 deletions src/apps/com.bilibili.studio.ts

This file was deleted.

20 changes: 8 additions & 12 deletions src/apps/com.coolapk.market.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,31 @@ export default defineAppConfig({
resetMatch: 'app',
actionCdKey: 0,
actionMaximumKey: 0,
quickFind: true,
rules: [
{
key: 0,
matches:
'[id$="ad_container"] >n [id$="tt_splash_skip_btn"||text^="跳过"]',
'@View[clickable=true] + TextView <<n * <n * > * >n [vid="ad_container"]',
snapshotUrls: [
'https://i.gkd.li/import/12503773',
'https://i.gkd.li/import/13247610',
'https://i.gkd.li/import/13264779',
'https://i.gkd.li/import/14162294',
'https://i.gkd.li/import/12917990',
'https://i.gkd.li/import/13826359',
'https://i.gkd.li/import/13827095',
'https://i.gkd.li/import/13247733', // 误触
'https://i.gkd.li/import/13247782', // 可能误触
'https://i.gkd.li/import/13296816', // snapshot of excludeMatches
],
},
{
key: 1,
matches:
'[id$="ad_container"] +n * > [id$="tt_splash_skip_btn"||text^="跳过"]',
'[id$="tt_splash_skip_btn"||text^="跳过"] < * -n [vid="ad_container"]',
snapshotUrls: ['https://i.gkd.li/import/13211392'],
},
{
key: 2,
quickFind: true,
matches:
'@View[clickable=true] <(2,3) FrameLayout <2 FrameLayout <<n FrameLayout[id="com.coolapk.market:id/ad_container"]',
snapshotUrls: [
'https://i.gkd.li/import/13826359',
'https://i.gkd.li/import/13827095',
],
},
],
},
{
Expand Down
3 changes: 2 additions & 1 deletion src/apps/com.miui.player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ export default defineAppConfig({
},
{
key: 11,
name: '局部广告-我的页面-顶部 banner 广告',
name: '局部广告-我的页面顶部 banner 广告',
activityIds: 'com.tencent.qqmusiclite.activity.MainActivity',
quickFind: true,
rules:
'[id="com.miui.player:id/banner_image"] + [id="com.miui.player:id/close_banner"]',
snapshotUrls: 'https://i.gkd.li/import/12700984',
Expand Down
3 changes: 2 additions & 1 deletion src/apps/com.miui.systemAdSolution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import { defineAppConfig } from '../types';

export default defineAppConfig({
id: 'com.miui.systemAdSolution',
name: 'miui系统广告',
name: '智能服务',
groups: [
{
key: 1,
name: '局部广告-miui-为什么不希望看到这条推广',
desc: '点击【不感兴趣】',
quickFind: true,
activityIds: [
'com.xiaomi.ad.feedback',
'com.android.thememanager.module.detail.view.ThemeDetailActivity',
Expand Down
3 changes: 2 additions & 1 deletion src/apps/com.rytong.hnair.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ export default defineAppConfig({
key: 1,
name: '全屏广告-首页弹窗广告',
enable: false,
quickFind: true,
activityIds: 'com.hnair.airlines.ui.main.MainActivity',
rules: 'ImageView[id*="com.rytong.hnair:id/iv_cloes"]',
rules: 'ImageView[id="com.rytong.hnair:id/iv_cloes"]',
snapshotUrls: 'https://i.gkd.li/import/12846381',
},
],
Expand Down
1 change: 0 additions & 1 deletion src/apps/com.tencent.mm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ export default defineAppConfig({
key: 4,
name: '功能类-微信读书网页版扫码登录自动授权',
enable: false,
quickFind: true,
matchTime: 10000,
actionMaximum: 1,
resetMatch: 'activity',
Expand Down
2 changes: 0 additions & 2 deletions src/apps/com.unionpay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export default defineAppConfig({
key: 2,
name: '分段广告-支付完成界面广告卡片',
enable: false,
quickFind: true,
activityIds: 'com.unionpay.activity.react.UPActivityReactNative',
rules: [
{
Expand Down Expand Up @@ -57,7 +56,6 @@ export default defineAppConfig({
name: '全屏广告-领取优惠弹窗',
desc: '点击X',
enable: false,
quickFind: true,
rules: [
{
activityIds: 'com.unionpay.cordova.UPActivityCordovaWeb',
Expand Down
20 changes: 11 additions & 9 deletions src/apps/com.weico.international.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,14 @@ export default defineAppConfig({
name: '分段广告-信息流广告',
desc: '包括主页,搜索页',
enable: false,
quickFind: true,
activityIds: [
'com.weico.international.activity.MainFragmentActivity',
'com.weico.international.ui.search.SearchActivity',
],
exampleUrls:
'https://github.com/gkd-kit/subscription/assets/38517192/e713a2ca-5048-486a-874f-dd876d53c49b',
rules: [
{
preKeys: [1],
name: '点击不感兴趣',
matches: '@View > [text="不感兴趣"]',
snapshotUrls: [
'https://i.gkd.li/import/12505755',
'https://i.gkd.li/import/12505764',
],
},
{
key: 0,
name: '点击广告卡片右上角[x]',
Expand All @@ -35,6 +27,16 @@ export default defineAppConfig({
'https://i.gkd.li/import/12857202',
],
},
{
key: 1,
preKeys: [0],
name: '点击不感兴趣',
matches: '[text="不感兴趣"]',
snapshotUrls: [
'https://i.gkd.li/import/12505755',
'https://i.gkd.li/import/12505764',
],
},
],
},
],
Expand Down
1 change: 0 additions & 1 deletion src/apps/com.xiaomi.market.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export default defineAppConfig({
key: 0,
name: '全屏广告-首页悬浮窗广告',
enable: false,
quickFind: true,
activityIds: 'com.xiaomi.market.ui.FloatWebActivity',
rules: '[id="com.xiaomi.market:id/webview_container"] >n [text="关闭"]',
snapshotUrls: 'https://i.gkd.li/import/13248808',
Expand Down
1 change: 1 addition & 0 deletions src/apps/com.yitong.mbank.psbc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default defineAppConfig({
key: 2,
name: '全屏广告-首页广告弹窗',
enable: false,
quickFind: true,
activityIds:
'com.yitong.mbank.psbc.module.home.view.activity.MainActivity',
rules:
Expand Down
Loading

0 comments on commit b76f2ec

Please sign in to comment.