From 8dd43eefd11c2b1c3c3b188a76fb03f0e66cd5d3 Mon Sep 17 00:00:00 2001 From: AIsouler Date: Sat, 16 Mar 2024 15:59:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=85=A8=E5=B1=80=E8=A7=84=E5=88=99?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E5=BA=94=E7=94=A8=E5=90=AF=E7=94=A8=E5=90=8D?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/globalGroups.ts | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/src/globalGroups.ts b/src/globalGroups.ts index 1904ff14..a24ddaeb 100644 --- a/src/globalGroups.ts +++ b/src/globalGroups.ts @@ -79,21 +79,36 @@ function filterAppsByGroup(apps: any[], groupNamePrefix: string): string[] { } // 设置单独禁用 -const uniqueAppIdsAD = new Set([ +const diabledAppIdsAD = new Set([ ...diabledAppIds, 'com.taptap', // TapTap ...filterAppsByGroup(apps, '开屏广告'), ]); -const uniqueAppIdsUP = new Set([ +const diabledAppIdsUP = new Set([ ...diabledAppIds, ...filterAppsByGroup(apps, '更新提示'), ]); -const uniqueAppIdsYM = new Set([ +const diabledAppIdsYM = new Set([ ...diabledAppIds, 'xxx.pornhub.fuck', // JavDB ...filterAppsByGroup(apps, '青少年模式'), ]); +// 系统软件全局启用 +const enabledAppIds: string[] = [ + // 在一些系统软件中启用 +]; + +// 设置系统软件单独启用 +const enabledAppIdsAD = new Set([ + ...enabledAppIds, + 'com.bbk.theme', // i 主题 + 'com.sec.android.app.samsungapps', // 三星应用商店 + 'com.bbk.appstore', // vivo应用商店 +]); +const enabledAppIdsUP = new Set([...enabledAppIds]); +const enabledAppIdsYM = new Set([...enabledAppIds]); + const globalGroups: RawGlobalGroup[] = [ { key: 0, @@ -116,7 +131,10 @@ const globalGroups: RawGlobalGroup[] = [ '[childCount=0][visibleToUser=true][(text.length<10 && (text*="跳过" || text*="跳過" || text*="skip" || text*="Skip")) || id$="tt_splash_skip_btn" || vid*="skip" || vid*="Skip" || desc*="跳过" || desc*="skip" || (vid*="count" && vid*="down" && vid!*="countdown" && vid!*="load" && vid!*="add" && vid!*="ead" && vid!*="time")]', }, ], - apps: [...uniqueAppIdsAD].map((id) => ({ id, enable: false })), + apps: [...diabledAppIdsAD].map( + (id) => ({ id, enable: false }), + [...enabledAppIdsAD].map((id) => ({ id, enable: true })), + ), }, { key: 1, @@ -137,7 +155,10 @@ const globalGroups: RawGlobalGroup[] = [ ], }, ], - apps: [...uniqueAppIdsUP].map((id) => ({ id, enable: false })), + apps: [...diabledAppIdsUP].map( + (id) => ({ id, enable: false }), + [...enabledAppIdsUP].map((id) => ({ id, enable: true })), + ), }, { key: 2, @@ -155,7 +176,10 @@ const globalGroups: RawGlobalGroup[] = [ ], }, ], - apps: [...uniqueAppIdsYM].map((id) => ({ id, enable: false })), + apps: [...diabledAppIdsYM].map( + (id) => ({ id, enable: false }), + [...enabledAppIdsYM].map((id) => ({ id, enable: true })), + ), }, ]; export default globalGroups;