@@ -165,6 +165,7 @@ let name,
165165 size ,
166166 proto ,
167167 engine ,
168+ jsenable ,
168169 jsptn ,
169170 jsarg ,
170171 rebody ,
@@ -557,8 +558,8 @@ if (binaryInfo != null && binaryInfo.length > 0) {
557558 rw_redirect ( x , mark )
558559 }
559560
560- if ( / \s ( ( r e q u e s t | r e s p o n s e ) - b o d y - j s o n - j q ) \s / . test ( _x ) ) {
561- let [ _ , regex , type , value ] = _x . match ( / ^ ( .* ?) \s + ?(?: ( r e q u e s t | r e s p o n s e ) - b o d y - j s o n - j q ) \s + ?( .* ?) \s * $ / )
561+ if ( / \s ( ( r e q u e s t | r e s p o n s e ) - b o d y - j s o n - j q ) \s | \s u r l \s j s o n j q - ( r e s p o n s e | r e q u e s t ) - b o d y / . test ( _x ) ) {
562+ let [ _ , regex , type , value ] = _x . match ( / ^ ( .* ?) \s + ?(?: u r l \s + ? j s o n j q - ) ? ( r e q u e s t | r e s p o n s e ) - b o d y (?: - j s o n - j q ) ? \s + ?( .* ?) \s * $ / )
562563 if ( jqEnabled && ( isSurgeiOS || isStashiOS ) ) {
563564 const jqPath = value . match ( / j q - p a t h = " ( .+ ?) " / ) ?. [ 1 ]
564565 if ( jqPath ) {
@@ -576,7 +577,7 @@ if (binaryInfo != null && binaryInfo.length > 0) {
576577 rwbodyBox . push ( { type : `http-${ type } -jq` , regex, value } )
577578 }
578579 } else if ( isLooniOS ) {
579- URLRewrite . push ( x )
580+ / b o d y - j s o n - j q / . test ( _x ) ? URLRewrite . push ( _x ) : URLRewrite . push ( ` ${ regex } ${ type } -body-json-jq ${ value } ` )
580581 }
581582 }
582583
@@ -821,6 +822,7 @@ if (binaryInfo != null && binaryInfo.length > 0) {
821822 : ''
822823 ability = getJsInfo ( x , / [ = , \s ] \s * a b i l i t y \s * = \s * / )
823824 engine = getJsInfo ( x , / [ = , \s ] \s * e n g i n e \s * = \s * / )
825+ jsenable = getJsInfo ( x , / [ = , \s ] \s * e n a b l e \s * = \s * / )
824826 updatetime = getJsInfo ( x , / [ = , \s ] \s * s c r i p t - u p d a t e - i n t e r v a l \s * = \s * / )
825827 timeout = getJsInfo ( x , / [ = , \s ] \s * t i m e o u t \s * = \s * / )
826828 tilesicon = jstype == 'generic' && / i c o n = / . test ( x ) ? x . split ( 'icon=' ) [ 1 ] . split ( '&' ) [ 0 ] : ''
@@ -843,6 +845,7 @@ if (binaryInfo != null && binaryInfo.length > 0) {
843845 timeout : '120' ,
844846 jsarg : '' ,
845847 rebody : '' ,
848+ jsenable,
846849 ori : x ,
847850 num : y ,
848851 } )
@@ -872,6 +875,7 @@ if (binaryInfo != null && binaryInfo.length > 0) {
872875 tilescolor,
873876 eventname,
874877 engine,
878+ jsenable,
875879 ori : x ,
876880 num : y ,
877881 } )
@@ -1448,6 +1452,7 @@ if (binaryInfo != null && binaryInfo.length > 0) {
14481452 rebody = jsBox [ i ] . rebody ? istrue ( jsBox [ i ] . rebody ) : ''
14491453 proto = jsBox [ i ] . proto ? istrue ( jsBox [ i ] . proto ) : ''
14501454 engine = jsBox [ i ] . engine ? jsBox [ i ] . engine : ''
1455+ jsenable = jsBox [ i ] . jsenable ? jsBox [ i ] . jsenable : ''
14511456 size = jsBox [ i ] . size ? jsBox [ i ] . size : ''
14521457 ability = jsBox [ i ] . ability ? ', ability=' + jsBox [ i ] . ability : ''
14531458 updatetime = jsBox [ i ] . updatetime ? ', script-update-interval=' + jsBox [ i ] . updatetime : ''
@@ -1480,6 +1485,7 @@ if (binaryInfo != null && binaryInfo.length > 0) {
14801485 size = size ? ', max-size=' + size : ''
14811486 timeout = timeout ? ', timeout=' + timeout : ''
14821487 engine = engine && isSurgeiOS ? ', engine=' + engine : ''
1488+ jsenable = jsenable && isLooniOS ? ', enable=' + jsenable : ''
14831489 if ( jsarg != '' && / , / . test ( jsarg ) && ! / ^ " .+ " $ / . test ( jsarg ) ) jsarg = ', argument="' + jsarg + '"'
14841490 if ( jsarg != '' && ( ! / , / . test ( jsarg ) || / ^ " .+ " $ / . test ( jsarg ) ) ) jsarg = ', argument=' + jsarg
14851491
@@ -1500,6 +1506,7 @@ if (binaryInfo != null && binaryInfo.length > 0) {
15001506 timeout +
15011507 ', tag=' +
15021508 jsname +
1509+ jsenable +
15031510 img +
15041511 jsarg
15051512 )
@@ -1569,6 +1576,7 @@ if (binaryInfo != null && binaryInfo.length > 0) {
15691576 timeout +
15701577 ', tag=' +
15711578 jsname +
1579+ jsenable +
15721580 img +
15731581 jsarg
15741582 )
0 commit comments