Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Commit

Permalink
feat: 开屏广告 order=-1
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Jan 27, 2024
1 parent 2e6a77e commit 738a636
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ export const writeConfig = async (config: RawSubscription) => {
'utf-8',
);

newConfig.apps?.forEach((app) => {
app.groups?.forEach((g) => {
if (g.name.startsWith('开屏广告')) {
g.order = -1;
}
});
});
// update gkd.json
const buffer = Buffer.from(orderdStringify5(newConfig, sortKeys), 'utf-8');
await fs.writeFile(gkdFp, buffer);
Expand Down
1 change: 1 addition & 0 deletions src/globalGroups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const globalGroups: RawGlobalGroup[] = [
{
key: 0,
name: '开屏广告',
order: -1,
actionMaximum: 2,
matchTime: 10000,
resetMatch: 'app',
Expand Down

0 comments on commit 738a636

Please sign in to comment.