File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,8 +61,8 @@ const chromeManifest = { ...manifest };
6161delete chromeManifest . content_security_policy ;
6262
6363delete firefoxManifest . sandbox ;
64- firefoxManifest . content_security_policy =
65- "script-src 'self' blob:; object-src 'self' blob:" ;
64+ // firefoxManifest.content_security_policy =
65+ // "script-src 'self' blob:; object-src 'self' blob:";
6666firefoxManifest . browser_specific_settings = {
6767 gecko : { strict_min_version : "91.1.0" } ,
6868} ;
Original file line number Diff line number Diff line change @@ -150,7 +150,6 @@ export class SystemManager extends Manager {
150150 "" ,
151151 uuidv5 ( data . data . uri , uuidv5 . URL )
152152 ) ;
153- console . log ( script ) ;
154153 this . scriptManager . event . upsertHandler ( script , "vscode" ) ;
155154 break ;
156155 }
Original file line number Diff line number Diff line change 4141 ],
4242 "sandbox" : {
4343 "pages" : [" src/sandbox.html" ]
44- },
45- "content_security_policy" : " script-src 'self' blob:; object-src 'self' blob:"
44+ }
4645}
Original file line number Diff line number Diff line change @@ -142,11 +142,17 @@ describe("特殊情况", () => {
142142 expect ( url . match ( "http://www.example.com/" ) ) . toEqual ( [ "ok1" ] ) ;
143143 } ) ;
144144
145- it ( "prefix *" , ( ) => {
146- const url = new UrlMatch < string > ( ) ;
147- url . add ( "*https://www.baidu.com*" , "ok1" ) ;
145+ it ( "prefix *" , ( ) => {
146+ const url = new UrlMatch < string > ( ) ;
147+ url . add ( "*https://www.baidu.com*" , "ok1" ) ;
148148 expect ( url . match ( "https://www.baidu.com" ) ) . toEqual ( [ "ok1" ] ) ;
149- } )
149+ } ) ;
150+ it ( "http*" , ( ) => {
151+ const url = new UrlMatch < string > ( ) ;
152+ url . add ( "http*://example.com/*" , "ok1" ) ;
153+ expect ( url . match ( "https://example.com/" ) ) . toEqual ( [ "ok1" ] ) ;
154+ expect ( url . match ( "http://example.com/" ) ) . toEqual ( [ "ok1" ] ) ;
155+ } ) ;
150156} ) ;
151157
152158// --- include
@@ -245,6 +251,9 @@ describe("UrlInclude-2", () => {
245251 )
246252 ) . toEqual ( [ "ok1" , "ok2" ] ) ;
247253 expect ( url . match ( "https://github.com/CodFrm" ) ) . toEqual ( [ "ok1" , "ok2" ] ) ;
254+ url . add ( "http*://example.com/*" , "ok3" ) ;
255+ expect ( url . match ( "https://example.com/" ) ) . toEqual ( [ "ok1" , "ok2" , "ok3" ] ) ;
256+ expect ( url . match ( "http://example.com/" ) ) . toEqual ( [ "ok1" , "ok2" , "ok3" ] ) ;
248257 } ) ;
249258 it ( "port" , ( ) => {
250259 const url = new UrlInclude < string > ( ) ;
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ export default class Match<T> {
4444 u . scheme = ".+?" ;
4545 break ;
4646 case "http*" :
47- u . scheme = "http[s]" ;
47+ u . scheme = "http[s]? " ;
4848 break ;
4949 default :
5050 }
@@ -236,7 +236,7 @@ export class UrlInclude<T> extends UrlMatch<T> {
236236 u . scheme = ".+?" ;
237237 break ;
238238 case "http*" :
239- u . scheme = "http[s]" ;
239+ u . scheme = "http[s]? " ;
240240 break ;
241241 default :
242242 }
You can’t perform that action at this time.
0 commit comments