How to redraw a page from a Google Chrome extension?

I am new to writing extensions for Google Chrome. I want to make an extension that only works on a few pages (which I will choose) and re-render their CSS after the page loads (ideally, I would like something similar to what you can do with GM_addStylegreasemonkey scripts).

How to do this in a Chrome extension?

+3
source share
1 answer

You can use Content scripts that have access to DOM pages.

In your manifest.json you can:

"content_scripts": [
    {
      "matches": ["http://www.google.com/*"],
      "css": ["mystyles.css"],
      "run_at": "document_end"
    }
  ],

, css Google DOM. , CSS, .

code.google.com. , CSS .

+3

Source: https://habr.com/ru/post/1740403/


All Articles