Answer the question
In order to leave comments, you need to log in
How to create an extension for Google chrome that replaces css file?
How to create an extension that adds css to a site, one specific site. I can't find any examples on google. In similar extensions, I looked at background js, there you can’t really figure out why the script decides that it is on the right page, and the manifest is not available. Tell me how this is done, I have experience in small extensions, but I can’t imagine how to solve this problem.
Poglazev on https://developer.chrome.com/extensions/content_scripts , caught up with how to insert css, giving the rights to the site I need, he changes css on all sites, what am I doing wrong?
So far, it is solved by creating very individual sets of classes, but are there any other ways out?)) This should still work not so crutch
Answer the question
In order to leave comments, you need to log in
In manifest.json:
"content_scripts": [{
"matches": ["ваш-урл-или-*-маска"],
"js": ["contentscript-min.js"]
}]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question