Skip to content

Commit f2cfbe3

Browse files
现在输出为Shadowrocket模块时不再直接替换模块参数
1 parent 5663b89 commit f2cfbe3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Rewrite-Parser.beta.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,14 +1853,14 @@ ${providers}
18531853
break
18541854
} //输出内容结束
18551855
body = body.replace(/\n{2,}/g, '\n\n')
1856-
if (!isSurgeiOS && !isLooniOS && sgArg.length > 0) {
1856+
if (isStashiOS && sgArg.length > 0) {
18571857
body = body.replaceAll('{{{', '{').replaceAll('}}}', '}')
18581858
for (let i = 0; i < sgArg.length; i++) {
18591859
let e = '{' + sgArg[i].key + '}'
18601860
let r = sgArg[i].value.split(',')[0]
18611861
body = body.replaceAll(e, r)
18621862
} //for
1863-
} else if (isSurgeiOS) {
1863+
} else if (isSurgeiOS || isShadowrocket) {
18641864
body = body.replaceAll('{{{', '{').replaceAll('}}}', '}')
18651865
for (let i = 0; i < sgArg.length; i++) {
18661866
let e = '{' + sgArg[i].key + '}'

Rewrite-Parser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,14 +1853,14 @@ ${providers}
18531853
break
18541854
} //输出内容结束
18551855
body = body.replace(/\n{2,}/g, '\n\n')
1856-
if (!isSurgeiOS && !isLooniOS && sgArg.length > 0) {
1856+
if (isStashiOS && sgArg.length > 0) {
18571857
body = body.replaceAll('{{{', '{').replaceAll('}}}', '}')
18581858
for (let i = 0; i < sgArg.length; i++) {
18591859
let e = '{' + sgArg[i].key + '}'
18601860
let r = sgArg[i].value.split(',')[0]
18611861
body = body.replaceAll(e, r)
18621862
} //for
1863-
} else if (isSurgeiOS) {
1863+
} else if (isSurgeiOS || isShadowrocket) {
18641864
body = body.replaceAll('{{{', '{').replaceAll('}}}', '}')
18651865
for (let i = 0; i < sgArg.length; i++) {
18661866
let e = '{' + sgArg[i].key + '}'

0 commit comments

Comments
 (0)