MAIN Content Script in Chrome Extensions is like James Bond

If you need your chrome extension to get as much intelligence from a website as possible - use a MAIN Content Script.

Video

Text

MAIN content script in a chrome extension is like James Bond.

You give James Bond a task and send him to execute, cutting ties to it completely.

We can still communicate with it, but only through simple window.postMessage signals

It has no sense of personal boundaries and can access a website's private parts and see their global variables.

Like a real spy It can get inside of a website's wiring and even override window.fetch to see how it is communicating with the backend.

So if you need your chrome extension to get as much intelligence from a website as possible - use a MAIN Content Script

You can learn more about execution worlds from the official Google Chrome Extnesion Development Docs: https://developer.chrome.com/docs/extensions/develop/concepts/content-scripts#isolated_world