Greetings. You need to make a change in styles (first) and content (text, a la localization) on the site using the Chrome extension. How best to implement it? The styles on the site itself are loaded via JS after the page is loaded, that is, as far as I understand, simply injecting CSS will not work.

So far I have been trying styles, tried so. This is a manifest:

"content_scripts": [{ "css": ["style.css"], "js": ["js/jquery.min.js", "js/content.js"], "matches": ["https://site.local/*"] }], 

This is content.js:

 $( document ).ready(function() { $("body").css("background-color", "#fff"); }); 

I apologize in advance if it’s somewhere specifically kosyachyu, the first time there was a need to write an extension, JS before that only saw in nightmarish dreams, I understand along the way.

    1 answer 1

    Actually, he already figured out. Made through adding your classes defined in style.css, using $ (). AddClass () in content.js.