I am designing a Chrome plugin. I have a script that injects CSS into a web page. It is linked to the popup.html for now, because it only works like that.
The problem is, I have to click on the icon to open the popup before the css is injected. Because that loads the javascript file to inject the CSS. I don't want to have to do that.
Oh, content scripts aren't an option, because they don't support the chrome.tabs API.
What I want to do: inject the CSS without ANY user interaction. Because to inject the CSS I have to click on the icon to open the popup to load the js to load the css.
How can I load that javascript file in the background to inject the css without ANY user interaction?