@@ -49,14 +49,14 @@ describe.concurrent("extractSchemesOfGlobs", () => {
4949 expect ( extractSchemesOfGlobs ( [ "https://www.google.com/a?b*c*" ] ) ) . toEqual ( [ "*://*/*" ] ) ;
5050 expect ( extractSchemesOfGlobs ( [ "http://www.google.com/a?b*c*" ] ) ) . toEqual ( [ "*://*/*" ] ) ;
5151 expect ( extractSchemesOfGlobs ( [ "https://*google.com/*" ] ) ) . toEqual ( [ "*://*/*" ] ) ;
52- // 預設包含 *://*/*
52+ // 预设包含 *://*/*
5353 expect ( extractSchemesOfGlobs ( [ "file:///mydrive/t*.html" ] ) ) . toEqual ( [ "*://*/*" , "file:///*" ] ) ;
5454 expect ( extractSchemesOfGlobs ( [ "file:///my?ive/t*.html" ] ) ) . toEqual ( [ "*://*/*" , "file:///*" ] ) ;
5555 // 其他scheme
5656 expect ( extractSchemesOfGlobs ( [ "my-protocol://hello/world/t_?*.html" ] ) ) . toEqual ( [ "*://*/*" , "my-protocol://*/*" ] ) ;
5757 expect ( extractSchemesOfGlobs ( [ "tcp://hello/world/t_?*.html" ] ) ) . toEqual ( [ "*://*/*" , "tcp://*/*" ] ) ;
5858 expect ( extractSchemesOfGlobs ( [ "ab://hello/world/t_?*.html" ] ) ) . toEqual ( [ "*://*/*" , "ab://*/*" ] ) ;
59- // 無視無效scheme
59+ // 无视无效scheme
6060 expect ( extractSchemesOfGlobs ( [ "myl*://hello/world/t_?*.html" ] ) ) . toEqual ( [ "*://*/*" ] ) ;
6161 expect ( extractSchemesOfGlobs ( [ "my?l//hello/world/t_?*.html" ] ) ) . toEqual ( [ "*://*/*" ] ) ;
6262 expect ( extractSchemesOfGlobs ( [ "*m?yl//hello/world/t_?*.html" ] ) ) . toEqual ( [ "*://*/*" ] ) ;
@@ -80,7 +80,7 @@ describe.concurrent("extractSchemesOfGlobs", () => {
8080 expect ( extractSchemesOfGlobs ( [ "my-place://mydrive/*" , "www.abc.com/*" ] ) . sort ( ) ) . toEqual (
8181 [ "my-place://*/*" , "*://*/*" ] . sort ( )
8282 ) ;
83- // 3個不重覆 (file:///)
83+ // 3个不重复 (file:///)
8484 expect (
8585 extractSchemesOfGlobs ( [ "https://www.abc.com/*" , "file:///mydrive/*" , "http://www.def.com/*" ] ) . sort ( )
8686 ) . toEqual ( [ "file:///*" , "*://*/*" ] . sort ( ) ) ;
@@ -98,7 +98,7 @@ describe.concurrent("extractSchemesOfGlobs", () => {
9898 ] ) . sort ( )
9999 ) . toEqual ( [ "file:///*" , "*://*/*" ] . sort ( ) ) ;
100100
101- // 3個不重覆 (my-path://)
101+ // 3个不重复 (my-path://)
102102 expect (
103103 extractSchemesOfGlobs ( [ "https://www.abc.com/*" , "my-path://mydrive/*" , "http://www.def.com/*" ] ) . sort ( )
104104 ) . toEqual ( [ "my-path://*/*" , "*://*/*" ] . sort ( ) ) ;
@@ -265,7 +265,7 @@ describe.concurrent("getApiMatchesAndGlobs-1 (基础测试)", () => {
265265 expect ( includeGlobs ) . toEqual ( [ ] ) ;
266266 } ) ;
267267 it . concurrent ( "match2" , ( ) => {
268- // 由於 *hello* ,故要 match 全部页面
268+ // 由于 *hello* ,故要 match 全部页面
269269 const scriptUrlPatterns = extractUrlPatterns ( [ "@include *hello*" ] ) ;
270270 const { matches, includeGlobs } = getApiMatchesAndGlobs ( scriptUrlPatterns ) ;
271271
@@ -274,7 +274,7 @@ describe.concurrent("getApiMatchesAndGlobs-1 (基础测试)", () => {
274274 } ) ;
275275
276276 it . concurrent ( "match3" , ( ) => {
277- // 由於 *hello* ,故要 match 全部页面
277+ // 由于 *hello* ,故要 match 全部页面
278278 const scriptUrlPatterns = extractUrlPatterns ( [
279279 "@match http://google.com/*" ,
280280 "@match https://google.com/*" ,
@@ -287,7 +287,7 @@ describe.concurrent("getApiMatchesAndGlobs-1 (基础测试)", () => {
287287 } ) ;
288288
289289 it . concurrent ( "match4" , ( ) => {
290- // 由於 *hello* ,故要 match 全部页面
290+ // 由于 *hello* ,故要 match 全部页面
291291 // @match 有 file:/// ,故追加 file:///* 至match
292292 const scriptUrlPatterns = extractUrlPatterns ( [
293293 "@match http://google.com/*" ,
@@ -425,7 +425,7 @@ describe.concurrent("getApiMatchesAndGlobs-2 (实际例子测试)", () => {
425425} ) ;
426426
427427describe . concurrent ( "getApiMatchesAndGlobs-3 (全面性测试)" , ( ) => {
428- it . concurrent ( "标準match格式 " , ( ) => {
428+ it . concurrent ( "标准match格式 " , ( ) => {
429429 const scriptUrlPatterns = extractUrlPatterns ( [
430430 "// @include *://www.bilibili.com/video/*" ,
431431 "// @include *://www.bilibili.com/list/*" ,
@@ -559,7 +559,7 @@ describe.concurrent("getApiMatchesAndGlobs-3 (全面性测试)", () => {
559559
560560 it . concurrent ( "[B2] regex转换成*://*/* (match only)" , ( ) => {
561561 // /live\\.bilibili\\.com/ 可匹配 123live.bilibili.com, www.live.bilibili.com, myhome.com/live.bilibili.com
562- // 相对於 (1) ,regex为较简单,glob部份不需转换
562+ // 相对于 (1) ,regex为较简单,glob部份不需转换
563563 const scriptUrlPatterns = extractUrlPatterns ( [
564564 "// @include *://www.bilibili.com/video/*" ,
565565 "// @include *://www.bilibili.com/list/*" ,
@@ -790,7 +790,7 @@ describe.concurrent("getApiMatchesAndGlobs-3 (全面性测试)", () => {
790790 } ) ;
791791
792792 it . concurrent ( "[F1] 混合 regex/glob pattern & file scheme 测试解析正确性" , ( ) => {
793- // 由於regex pattern 而fallback至全部页面
793+ // 由于regex pattern 而fallback至全部页面
794794 // 含有 file:///,追加 "file:///*"
795795 const scriptUrlPatterns = extractUrlPatterns ( [
796796 "// @include *://www.google.com/video/*" ,
0 commit comments