Skip to content

Commit

Permalink
feat: 规则维护更新 (#330)
Browse files Browse the repository at this point in the history
* feat: 全局规则-更新提示

* feat(PU口袋校园): 弹窗广告

* feat(QQ): 好友动态广告卡片

* fix(微信): 朋友圈广告

* feat(QQ邮箱): 列表卡片广告

* feat(应用包管理组件): 备案信息弹窗

* feat(支付宝): 关闭花呗,借呗,还款升级,信用卡推荐弹窗

* feat(百度贴吧): 贴吧内签到并关闭弹窗

* feat(百度贴吧): 信息流广告, 悬浮小广告, 帖子推广

* docs: update Template.md

* fix: com.tencent.androidqqmail.ts

* fix: update globalGroups.ts

* chore(actions): check_format_lint

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
aoguai and github-actions[bot] authored Nov 28, 2024
1 parent 97d6165 commit 24b1025
Show file tree
Hide file tree
Showing 9 changed files with 90 additions and 27 deletions.
6 changes: 3 additions & 3 deletions Template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @aoguai/subscription

此仓库由 aoguai 维护,提供 GKD 订阅规则
此仓库由 aoguai 维护,提供 GKD 第三方订阅规则

✨避免臃肿冗余耗电,提供更**全面**的订阅体验✨

Expand All @@ -14,7 +14,7 @@

**请注意:**

- **本项目维护的规则仅启用 `开屏广告` 一类规则, 其它所有规则均需用户手动打开**
- **本项目维护的规则仅默认启用 `开屏广告` 一类规则, 其它所有规则均需用户手动打开**

## 说明 📝

Expand All @@ -26,7 +26,7 @@

**❗️ 此仓库仅接受与全局规则相关的维护或改进的 issues 或 PR 提交。**

如果您需要任何额外的 APP 规则,您需要[自行编写规则](https://github.com/gkd-kit/subscription-template)并将其添加到本地规则中使用
如果您需要任何额外的 APP 规则,您可以参考[官方语法介绍](https://gkd.li/guide/selector)并将其添加到**本地规则**中或执行搭建 [GKD 订阅模板](https://github.com/gkd-kit/subscription-template) 使用

如果您希望参与贡献此项目,请参阅 [CONTRIBUTING.md](./CONTRIBUTING.md)

Expand Down
42 changes: 35 additions & 7 deletions src/apps/com.baidu.tieba.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ export default defineGkdApp({
{
key: 5,
activityIds: [
'com.baidu.tieba.tblauncher.MainTabActivity',
'com.baidu.tieba.pb.pb.main.PbActivity',
'com.baidu.tieba.forum.ForumActivity',
'com.baidu.tieba.tblauncher.MainTabActivity',
Expand Down Expand Up @@ -122,6 +121,7 @@ export default defineGkdApp({
key: 3,
name: '局部广告-首页、推荐列表顶部卡片式广告',
matchTime: 10000,
forcedTime: 10000,
actionMaximum: 1,
activityIds: [
'com.baidu.tieba.tblauncher.MainTabActivity',
Expand All @@ -134,6 +134,13 @@ export default defineGkdApp({
'RelativeLayout[childCount=2] > @RelativeLayout[childCount=1][clickable=true] > ImageView',
snapshotUrls: 'https://i.gkd.li/import/13060892',
},
{
key: 2,
fastQuery: true,
matches:
'@[clickable=true][vid="obfuscated"][visibleToUser=true] < LinearLayout <4 RelativeLayout +3 LinearLayout >4 [text="小游戏"]',
snapshotUrls: 'https://i.gkd.li/i/17943902',
},
],
},
{
Expand Down Expand Up @@ -202,13 +209,18 @@ export default defineGkdApp({
{
key: 0,
name: '首页右侧悬浮广告-1',
activityIds: 'com.baidu.tieba.tblauncher.MainTabActivity',
activityIds: [
'.tblauncher.MainTabActivity',
'.pb.pb.main.PbActivity',
],
matches:
'@ImageView[clickable=true] - TextView[text="广告"] < RelativeLayout + ImageView',
'@ImageView[clickable=true][visibleToUser=true][vid="obfuscated"] - [text="广告"]',
snapshotUrls: [
'https://i.gkd.li/import/13115167',
'https://i.gkd.li/import/13327933', // 原规则在此误触
'https://i.gkd.li/i/16622395',
'https://i.gkd.li/i/16632851',
],
excludeSnapshotUrls: 'https://i.gkd.li/import/13327933',
},
{
key: 1,
Expand Down Expand Up @@ -260,17 +272,22 @@ export default defineGkdApp({
{
key: 12,
name: '功能类-贴吧内签到并关闭弹窗',
fastQuery: true,
enable: false,
actionMaximum: 1,
rules: [
{
key: 0,
name: '贴吧页签到',
activityIds: 'com.baidu.tieba.forum.ForumActivity',
matches:
'@TextView[text="签到"][visibleToUser=true] <<n WebView[text="frs"]',
anyMatches: [
'@TextView[text="签到"][visibleToUser=true] <3 View < View <2 View < View < WebView < WebView < FrameLayout < ViewGroup <2 FrameLayout < FrameLayout < [id="android:id/content"]',
'@TextView[text="签到"][visibleToUser=true] <5 View < View <2 View < WebView < WebView < FrameLayout < ViewGroup <2 FrameLayout < FrameLayout < [id="android:id/content"]',
],
snapshotUrls: [
'https://i.gkd.li/import/13776801',
'https://i.gkd.li/i/15087289',
'https://i.gkd.li/i/17902156',
],
},
{
Expand All @@ -279,7 +296,8 @@ export default defineGkdApp({
name: '关闭签到成功弹窗',
activityIds: 'com.baidu.tbadk.browser.TBWebContainerActivity',
action: 'back',
matches: 'WebView[text="签到弹窗"]',
matches:
'@WebView[text="签到弹窗"][visibleToUser=true] < WebView < FrameLayout < LinearLayout < RelativeLayout < [id="android:id/content"]',
snapshotUrls: [
'https://i.gkd.li/import/13776424',
'https://i.gkd.li/i/15087327',
Expand All @@ -294,6 +312,7 @@ export default defineGkdApp({
desc: '关闭首页、吧内游戏推广帖子',
rules: [
{
key: 0,
fastQuery: true,
activityIds: [
'com.baidu.tieba.forum.ForumActivity',
Expand All @@ -311,6 +330,15 @@ export default defineGkdApp({
'https://i.gkd.li/i/16828436',
],
},
{
key: 1,
matches:
'@ImageView[clickable=true][visibleToUser=true][vid="obfuscated"] - [text="你可能感兴趣的吧" || text^="本吧的人都在逛"]',
snapshotUrls: [
'https://i.gkd.li/i/16914357',
'https://i.gkd.li/i/17944680',
],
},
],
},
],
Expand Down
7 changes: 4 additions & 3 deletions src/apps/com.eg.android.AlipayGphone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export default defineGkdApp({
groups: [
{
key: 0,
name: '通知提示-关闭花呗, 借呗,还款升级弹窗',
desc: '包括升级和开通弹窗',
name: '通知提示-关闭花呗,借呗,还款升级,信用卡推荐弹窗',
desc: '支付成功后的包括升级,开通,推荐的弹窗',
enable: false,
actionMaximum: 1,
resetMatch: 'app',
Expand All @@ -21,7 +21,7 @@ export default defineGkdApp({
{
key: 0,
matches:
'@[(name$=".Image")||((text^="暂不升级"||text^="放弃升级")||text="关闭")][visibleToUser=true][desc.length=null] <<n * <n * > * >n [((text^="同意")&&((text*="协议并"||text*="升级并")))&&(text$="确认交易"||text$="升级"||text$="开通"||text$="刷脸验证"||text$="付款")||text="确认"]',
'@[(name$=".Image")||((text^="暂不升级"||text^="放弃升级")||text="关闭")][visibleToUser=true][desc.length=null] <<n * <n * > * >n [((text^="同意")&&((text*="协议并"||text*="升级并")))&&(text$="确认交易"||text$="升级"||text$="开通"||text$="刷脸验证"||text$="付款")||text="确认"||text="立即领取"]',
snapshotUrls: [
'https://i.gkd.li/import/12737055', //com.alipay.mobile.nebulax.integration.mpaas.activity.NebulaActivity$Main
'https://i.gkd.li/import/13915022',
Expand All @@ -36,6 +36,7 @@ export default defineGkdApp({
'https://i.gkd.li/i/15050300',
'https://i.gkd.li/i/16106615',
'https://i.gkd.li/i/17391739',
'https://i.gkd.li/i/17945065',
],
},
],
Expand Down
14 changes: 14 additions & 0 deletions src/apps/com.miui.packageinstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,19 @@ export default defineGkdApp({
},
],
},
{
key: 15,
name: '功能类-备案信息弹窗',
desc: '点击[继续安装]',
rules: [
{
fastQuery: true,
activityIds:
'com.miui.packageInstaller.ui.InstallPrepareAlertActivity',
matches: ['[text$="备案信息"]', '[text="继续安装"]'],
snapshotUrls: 'https://i.gkd.li/i/17908298',
},
],
},
],
});
19 changes: 11 additions & 8 deletions src/apps/com.tencent.androidqqmail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,24 @@ export default defineGkdApp({
snapshotUrls: 'https://i.gkd.li/import/12775857',
},
{
name: '英文版邮箱广告-点击Not interested',
key: 8,
preKeys: [0],
matches: '@FrameLayout > TextView[text="Not interested"]',
snapshotUrls: 'https://i.gkd.li/import/12842775',
key: 2,
matches: '[vid="btn_advertise_click_area"]',
snapshotUrls: 'https://i.gkd.li/i/17908070',
},
{
preKeys: [0, 1], // https://github.com/gkd-kit/subscription/issues/1776
key: 9,
preKeys: [0, 1, 2], // https://github.com/gkd-kit/subscription/issues/1776
key: 8,
name: '点击[不感兴趣]',
matches: '[text="不感兴趣"]',
anyMatches: [
'[text="不感兴趣"]',
'@FrameLayout > TextView[text="Not interested"]',
],
snapshotUrls: [
'https://i.gkd.li/import/12775862',
'https://i.gkd.li/import/12842775',
'https://i.gkd.li/i/15051479',
'https://i.gkd.li/i/16824453',
'https://i.gkd.li/i/17908078',
],
},
],
Expand Down
1 change: 1 addition & 0 deletions src/apps/com.tencent.mm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default defineGkdApp({
excludeMatches: [
'[text="设置备注和标签"]', // 设置备注页面
'[text="朋友权限"]', // 资料页面
'[text="申请添加朋友"]', // 添加好友页面
],
matches:
'LinearLayout[visibleToUser=true][checked=false] >2 LinearLayout[visibleToUser=true][focusable=false] > TextView[text.length!=null] +1 LinearLayout[text.length=null&&desc=null&&clickable=true&&focusable=true]',
Expand Down
12 changes: 10 additions & 2 deletions src/apps/com.tencent.mobileqq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,13 @@ export default defineGkdApp({
{
key: 2,
name: '分段广告-好友动态广告卡片',
matchRoot: true,
enable: false,
activityIds: [
'com.tencent.mobileqq.activity.SplashActivity',
'com.qzone.reborn.feedx.activity.QZoneFriendFeedXActivity',
'com.qzone.reborn.base.QZoneTransparentShellActivity',
'com.qzone.reborn.base.QZoneShellActivity',
],
rules: [
{
Expand Down Expand Up @@ -120,8 +123,13 @@ export default defineGkdApp({
key: 3,
name: '好友动态详情页广告',
fastQuery: true,
matches: '@[desc="关闭广告"][visibleToUser=true] -3 [text^="活动"]',
snapshotUrls: 'https://i.gkd.li/i/17009847',
matches:
'@[desc="关闭广告"][visibleToUser=true] <4 RelativeLayout <2 LinearLayout <2 LinearLayout < FrameLayout <(n) RecyclerView < FrameLayout - FrameLayout >2 [text="详情"]',
snapshotUrls: [
'https://i.gkd.li/i/17009847',
'https://i.gkd.li/i/17815694',
'https://i.gkd.li/i/17827969',
],
},
{
preKeys: 0,
Expand Down
8 changes: 8 additions & 0 deletions src/apps/com.xyhui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ export default defineGkdApp({
'https://i.gkd.li/i/17690704',
],
},
{
key: 6,
name: '拼多多广告2',
activityIds: ['.lut.act.LutMainActivity'],
matches:
'@[desc="top_close_button"] <<n [id="com.kwad.dy.sdk:id/ksad_tk_view"]',
snapshotUrls: ['https://i.gkd.li/i/17945057'],
},
],
},
],
Expand Down
8 changes: 4 additions & 4 deletions src/globalGroups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -274,31 +274,31 @@ export default defineGkdGlobalGroups([
{
key: 0,
matches: [
`${COMMON_PREFIX}[(text*="内测"||text*="测试版"||text*="新版"||text*="更新"||text*="升级"||text*="体验"||text*="內測"||text*="測試版"||text*="升級"||text*="體驗"||text~="(?is).*Update.*"||text~="(?is).*Upgrade.*"||text~="(?is).*Experience.*")&&text!*="自动"&&text!*="自動"&&(text!*="成功"&&text!*="失败"&&text!*="失敗"&&(text!*="已"||text*="已知")&&text!*="检查更新"&&text!*="卸载")]`,
`${COMMON_PREFIX}[((text*="内测"||text*="测试版"||text*="新版"||text*="更新"||text*="升级"||text*="体验"||text*="內測"||text*="測試版"||text*="升級"||text*="體驗"||text~="(?is).*Update.*"||text~="(?is).*Upgrade.*"||text~="(?is).*Experience.*")&&text!*="自动"&&text!*="自動"&&(text!*="成功"&&text!*="失败"&&text!*="失敗"&&(text!*="已"||text*="已知")&&text!*="检查更新"&&text!*="卸载")&&text.length>2)]`,
`${COMMON_PREFIX}[((((text*="立即"||text*="马上"||text*="并"||text*="现在"||text*="立刻"||text*="抢先")&&(text*="更新"||text*="下载"||text*="安装"||text*="升级"||text*="查看"||text*="体验"))||text="更新"||text="下载"||text="安装"||text="升级"||text="确定"||text="好,升级")&&text.length<6)||((text~="(?is).*(更新.*?)(\\\\(|()\\\\d+(\\\\.\\\\d+)?(K|M|G|KB|MB|GB)(\\\\)|))")&&text.length<15)]`,
`${NEGATION_PART_RULE_TEXT}`,
],
},
{
key: 1,
matches: [
`${COMMON_PREFIX}[(desc*="内测"||desc*="测试版"||desc*="新版"||desc*="更新"||desc*="升级"||desc*="体验"||desc*="內測"||desc*="測試版"||desc*="升級"||desc*="體驗"||desc~="(?is).*Update.*"||desc~="(?is).*Upgrade.*"||desc~="(?is).*Experience.*")&&desc!*="自动"&&desc!*="自動"&&(desc!*="成功"&&desc!*="失败"&&desc!*="失敗"&&(desc!*="已"||desc*="已知")&&desc!*="检查更新"&&desc!*="卸载")]`,
`${COMMON_PREFIX}[((desc*="内测"||desc*="测试版"||desc*="新版"||desc*="更新"||desc*="升级"||desc*="体验"||desc*="內測"||desc*="測試版"||desc*="升級"||desc*="體驗"||desc~="(?is).*Update.*"||desc~="(?is).*Upgrade.*"||desc~="(?is).*Experience.*")&&desc!*="自动"&&desc!*="自動"&&(desc!*="成功"&&desc!*="失败"&&desc!*="失敗"&&(desc!*="已"||desc*="已知")&&desc!*="检查更新"&&desc!*="卸载")&&desc.length>2)]`,
`${COMMON_PREFIX}[((((desc*="立即"||desc*="马上"||desc*="并"||desc*="现在"||desc*="立刻"||desc*="抢先")&&(desc*="更新"||desc*="下载"||desc*="安装"||desc*="升级"||desc*="查看"||desc*="体验"))||desc="更新"||desc="下载"||desc="安装"||desc="升级"||desc="确定"||desc="好,升级")&&desc.length<6)||((desc~="(?is).*(更新.*?)(\\\\(|()\\\\d+(\\\\.\\\\d+)?(K|M|G|KB|MB|GB)(\\\\)|))")&&desc.length<15)]`,
`${NEGATION_PART_RULE_DESC}`,
],
},
{
key: 2,
matches: [
`${COMMON_PREFIX}[(text*="内测"||text*="测试版"||text*="新版"||text*="更新"||text*="升级"||text*="体验"||text*="內測"||text*="測試版"||text*="升級"||text*="體驗"||text~="(?is).*Update.*"||text~="(?is).*Upgrade.*"||text~="(?is).*Experience.*")&&text!*="自动"&&text!*="自動"&&(text!*="成功"&&text!*="失败"&&text!*="失敗"&&(text!*="已"||text*="已知")&&text!*="检查更新"&&text!*="卸载")]`,
`${COMMON_PREFIX}[((text*="内测"||text*="测试版"||text*="新版"||text*="更新"||text*="升级"||text*="体验"||text*="內測"||text*="測試版"||text*="升級"||text*="體驗"||text~="(?is).*Update.*"||text~="(?is).*Upgrade.*"||text~="(?is).*Experience.*")&&text!*="自动"&&text!*="自動"&&(text!*="成功"&&text!*="失败"&&text!*="失敗"&&(text!*="已"||text*="已知")&&text!*="检查更新"&&text!*="卸载")&&text.length>2)]`,
`${COMMON_PREFIX}[((((text*="立即"||text*="马上"||text*="并"||text*="现在"||text*="立刻"||text*="抢先")&&(text*="更新"||text*="下载"||text*="安装"||text*="升级"||text*="查看"||text*="体验"))||text="更新"||text="下载"||text="安装"||text="升级"||text="确定"||text="好,升级")&&text.length<6)||((text~="(?is).*(更新.*?)(\\\\(|()\\\\d+(\\\\.\\\\d+)?(K|M|G|KB|MB|GB)(\\\\)|))")&&text.length<15)]`,
`${NEGATION_PART_RULE_BUTTON}`,
],
},
{
key: 3,
matches: [
`${COMMON_PREFIX}[(desc*="内测"||desc*="测试版"||desc*="新版"||desc*="更新"||desc*="升级"||desc*="体验"||desc*="內測"||desc*="測試版"||desc*="升級"||desc*="體驗"||desc~="(?is).*Update.*"||desc~="(?is).*Upgrade.*"||desc~="(?is).*Experience.*")&&desc!*="自动"&&desc!*="自動"&&(desc!*="成功"&&desc!*="失败"&&desc!*="失敗"&&(desc!*="已"||desc*="已知")&&desc!*="检查更新"&&desc!*="卸载")]`,
`${COMMON_PREFIX}[((desc*="内测"||desc*="测试版"||desc*="新版"||desc*="更新"||desc*="升级"||desc*="体验"||desc*="內測"||desc*="測試版"||desc*="升級"||desc*="體驗"||desc~="(?is).*Update.*"||desc~="(?is).*Upgrade.*"||desc~="(?is).*Experience.*")&&desc!*="自动"&&desc!*="自動"&&(desc!*="成功"&&desc!*="失败"&&desc!*="失敗"&&(desc!*="已"||desc*="已知")&&desc!*="检查更新"&&desc!*="卸载")&&desc.length>2)]`,
`${COMMON_PREFIX}[((((desc*="立即"||desc*="马上"||desc*="并"||desc*="现在"||desc*="立刻"||desc*="抢先")&&(desc*="更新"||desc*="下载"||desc*="安装"||desc*="升级"||desc*="查看"||desc*="体验"))||desc="更新"||desc="下载"||desc="安装"||desc="升级"||desc="确定"||desc="好,升级")&&desc.length<6)||((desc~="(?is).*(更新.*?)(\\\\(|()\\\\d+(\\\\.\\\\d+)?(K|M|G|KB|MB|GB)(\\\\)|))")&&desc.length<15)]`,
`${NEGATION_PART_RULE_BUTTON}`,
],
Expand Down

0 comments on commit 24b1025

Please sign in to comment.