Ah, yes there is. There is content_scripts where you can specify url matches, javascript, and css files. There's actually a good reason why I didn't use them, if I recall correctly.
So the reason is that you need permissions to run it. So, it requires user interaction and the user to "allow it to run" every time this page is opened. I wanted a more "automatic" injection where the user doesn't have to interact with the extension. The approach I took eliminates any need for any permissions.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Isn't it possible to add the css file in content_scripts in manifest.json to inject it on page load?
Ah, yes there is. There is
content_scripts
where you can specify url matches, javascript, and css files. There's actually a good reason why I didn't use them, if I recall correctly.So the reason is that you need permissions to run it. So, it requires user interaction and the user to "allow it to run" every time this page is opened. I wanted a more "automatic" injection where the user doesn't have to interact with the extension. The approach I took eliminates any need for any permissions.