11import USAPI from "./api.js" ;
2- import { getColor } from "@shared/colors.js" ;
2+ import { colors } from "@shared/colors.js" ;
33
44// code received from background page will be stored in this variable
55// code referenced again when strict CSPs block initial injection attempt
@@ -63,13 +63,13 @@ ${userscript.code}
6363 }
6464 const world = injectInto === "content" ? "content" : "page" ;
6565 if ( window . self === window . top ) {
66- console . info ( `Injecting: ${ name } %c(js/${ world } )` , getColor ( " yellow" ) ) ;
66+ console . info ( `Injecting: ${ name } %c(js/${ world } )` , colors . yellow ) ;
6767 } else {
6868 console . info (
6969 `Injecting: ${ name } %c(js/${ world } )%c - %cframe(${ label } )(${ window . location } )` ,
70- getColor ( " yellow" ) ,
71- getColor ( ) ,
72- getColor ( " blue" ) ,
70+ colors . yellow ,
71+ colors . inherit ,
72+ colors . blue ,
7373 ) ;
7474 }
7575 if ( world === "page" ) {
@@ -95,13 +95,13 @@ ${userscript.code}
9595
9696function injectCSS ( name , code ) {
9797 if ( window . self === window . top ) {
98- console . info ( `Injecting ${ name } %c(css)` , getColor ( " green" ) ) ;
98+ console . info ( `Injecting ${ name } %c(css)` , colors . green ) ;
9999 } else {
100100 console . info (
101101 `Injecting ${ name } %c(css)%c - %cframe(${ label } )(${ window . location } )` ,
102- getColor ( " green" ) ,
103- getColor ( ) ,
104- getColor ( " blue" ) ,
102+ colors . green ,
103+ colors . inherit ,
104+ colors . blue ,
105105 ) ;
106106 }
107107 // Safari lacks full support for tabs.insertCSS
@@ -247,7 +247,7 @@ function listeners() {
247247 for ( let i = 0 ; i < data . files . menu . length ; i ++ ) {
248248 const item = data . files . menu [ i ] ;
249249 if ( item . scriptObject . filename === filename ) {
250- console . info ( `Injecting ${ filename } %c(js)` , getColor ( " yellow" ) ) ;
250+ console . info ( `Injecting ${ filename } %c(js)` , colors . yellow ) ;
251251 injectJS ( item ) ;
252252 return ;
253253 }
0 commit comments