Skip to content

Commit

Permalink
fix: unite rules keys
Browse files Browse the repository at this point in the history
  • Loading branch information
adproqwq committed Apr 5, 2024
1 parent 8e8c3a6 commit 9cf7fed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Template.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ Fork 本仓库的 `main`分支。

运行成功后,转换结果会出现在`-2.json`

参考[教程](https://ltt2gkd.adproqwq.xyz/tutoril.html)导入GKD使用。

由于hash的不可逆性,部分规则会因无法获取具体的应用信息,而被抛弃,具体抛弃数量可以查看`log.txt`

#### 本地运行
Expand Down Expand Up @@ -54,6 +56,8 @@ pnpm convert

运行成功后,转换结果会出现在`-2.json`

参考[教程](https://ltt2gkd.adproqwq.xyz/tutoril.html)导入GKD使用。

由于hash的不可逆性,部分规则会因无法获取具体的应用信息,而被抛弃,具体抛弃数量可以查看`log.txt`

### 2. 补丁
Expand Down
4 changes: 2 additions & 2 deletions src/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const convert = async () => {
let thisSub: RawSubscription = {
id: -2,
name: '本地订阅',
version: 1,
version: 0,
author: 'gkd',
globalGroups: [],
categories: [],
Expand Down Expand Up @@ -92,7 +92,7 @@ const convert = async () => {
thisGroup.rules = thisGroupRules;
if(LappConfig.hasOwnProperty('unite_popup_rules')){
if(LappConfig.unite_popup_rules == true){
if(ruleKeyCount < getJsonArrayLength(LappConfig) - 1) ruleKeyCount++;
if(ruleKeyCount < getJsonArrayLength(Lrules) - 1) ruleKeyCount++;
else{
thisApp.groups.push(thisGroup);
groupKeyCount++;
Expand Down

0 comments on commit 9cf7fed

Please sign in to comment.