11import USAPI from "./api.js" ;
2+ import { getColor } from "@shared/colors.js" ;
23
34// code received from background page will be stored in this variable
45// code referenced again when strict CSPs block initial injection attempt
@@ -62,13 +63,13 @@ ${userscript.code}
6263 }
6364 const world = injectInto === "content" ? "content" : "page" ;
6465 if ( window . self === window . top ) {
65- console . info ( `Injecting: ${ name } %c(js/${ world } )` , "color: #fff600" ) ;
66+ console . info ( `Injecting: ${ name } %c(js/${ world } )` , getColor ( "yellow" ) ) ;
6667 } else {
6768 console . info (
6869 `Injecting: ${ name } %c(js/${ world } )%c - %cframe(${ label } )(${ window . location } )` ,
69- "color: #fff600" ,
70- "color: inherit" ,
71- "color: #006fff" ,
70+ getColor ( "yellow" ) ,
71+ getColor ( ) ,
72+ getColor ( "blue" ) ,
7273 ) ;
7374 }
7475 if ( world === "page" ) {
@@ -94,13 +95,13 @@ ${userscript.code}
9495
9596function injectCSS ( name , code ) {
9697 if ( window . self === window . top ) {
97- console . info ( `Injecting ${ name } %c(css)` , "color: #60f36c" ) ;
98+ console . info ( `Injecting ${ name } %c(css)` , getColor ( "green" ) ) ;
9899 } else {
99100 console . info (
100101 `Injecting ${ name } %c(css)%c - %cframe(${ label } )(${ window . location } )` ,
101- "color: #60f36c" ,
102- "color: inherit" ,
103- "color: #006fff" ,
102+ getColor ( "green" ) ,
103+ getColor ( ) ,
104+ getColor ( "blue" ) ,
104105 ) ;
105106 }
106107 // Safari lacks full support for tabs.insertCSS
@@ -246,7 +247,7 @@ function listeners() {
246247 for ( let i = 0 ; i < data . files . menu . length ; i ++ ) {
247248 const item = data . files . menu [ i ] ;
248249 if ( item . scriptObject . filename === filename ) {
249- console . info ( `Injecting ${ filename } %c(js)` , "color: #fff600" ) ;
250+ console . info ( `Injecting ${ filename } %c(js)` , getColor ( "yellow" ) ) ;
250251 injectJS ( item ) ;
251252 return ;
252253 }
0 commit comments