Skip to content

Commit

Permalink
perf: 更新规则
Browse files Browse the repository at this point in the history
  • Loading branch information
MengNianxiaoyao committed Apr 5, 2024
1 parent ef7621c commit 3e3c9c9
Show file tree
Hide file tree
Showing 4 changed files with 342 additions and 20 deletions.
23 changes: 12 additions & 11 deletions src/categories.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { RawCategory } from '@gkd-kit/api';

const categories: RawCategory[] = [
{
key: -1,
name: '权限提示',
},
{
key: 0,
name: '开屏广告',
Expand All @@ -26,34 +30,31 @@ const categories: RawCategory[] = [
name: '定位提示',
},
{
key: -1,
name: '权限提示',
},
{
// 不影响使用的广告, 所有的广告卡片及悬浮广告按钮
key: 6,
name: '局部广告',
// 不影响使用的广告, 所有的广告卡片及悬浮广告按钮
},
{
key: 7,
name: '全屏广告',
// 不关闭广告就无法进行其它操作的广告弹窗, 它阻碍用户操作
// 一般是刚进入APP时显示的全屏弹窗
key: 7,
name: '全屏广告',
},
{
key: 8,
name: '分段广告',
// 如微信朋友圈广告/酷安帖子广告/贴吧帖子广告
// 需要分阶段多步操作才能关闭, 会造成屏幕略微闪烁, 稍微影响用户体验
key: 8,
name: '分段广告',
},
{
// 非广告, 点击某些功能按钮
key: 9,
name: '功能类',
// 非广告, 点击某些功能按钮
},
{
// 不知道怎么分类就往这放
key: 10,
name: '未分类', // 不知道怎么分类就往这放
name: '未分类',
},
];

Expand Down
24 changes: 24 additions & 0 deletions src/globalDefaultApps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ export const openAdBlackListAppIDs = new Set([
...filterAppsByGroup(apps, '开屏广告'),
]);

// 全屏广告黑名单
export const fullAdBlackListAppIDs = new Set([...blackListAppIDs,]);

// 局部广告黑名单
export const partialAdBlackListAppIDs = new Set([...blackListAppIDs,]);

// 更新提示黑名单
export const updateBlackListAppIDs = new Set([
...blackListAppIDs,
Expand All @@ -129,6 +135,12 @@ export const yongBlackListAppIDs = new Set([
...filterAppsByGroup(apps, '青少年模式'),
]);

// 评价提示黑名单
export const reviewBlackListAppIDs = new Set([...blackListAppIDs]);

// 通知提示黑名单
export const notificationBlackListAppIDs = new Set([...blackListAppIDs]);

// 全局规则白名单(由于系统应用默认禁用全局规则,所以对系统应用启用白名单模式)
// 在一些系统软件中启用所有全局规则
export const whiteListAppIDs: string[] = [];
Expand All @@ -146,8 +158,20 @@ export const openAdWhiteListAppIDs = new Set([
'com.miui.player', // 小米音乐
]);

// 全屏广告白名单
export const fullAdWhiteListAppIDs = new Set([...whiteListAppIDs]);

// 局部广告白名单
export const partialAdWhiteListAppIDs = new Set([...whiteListAppIDs]);

// 更新提示白名单
export const updateWhiteListAppIDs = new Set([...whiteListAppIDs]);

// 青少年模式白名单
export const yongWhiteListAppIDs = new Set([...whiteListAppIDs]);

// 评价提示白名单
export const reviewWhiteListAppIDs = new Set([...whiteListAppIDs]);

// 通知提示白名单
export const notificationWhiteListAppIDs = new Set([...whiteListAppIDs]);
Loading

0 comments on commit 3e3c9c9

Please sign in to comment.