- The code is bundled with webpack
- The UI is built with React and Typescript*
* Note that at this point typescript is only used for react code.
The extension is made out of 3 main components
src/inject
This script contains code which (as its name suggests) gets injected into the web page and is the entry point for all prebid & gpt data collection.
It has 3 main roles
- check if prebid/gpt exists in the page (injected.js)
- hook into prebid/gpt events and process them with dataframe.js (handlers.js)
- create and control the masks (ad overlays) on the page (InjectedApp.tsx)
src/pages/Content/index.js
This script has 2 main roles
- get the processed data from the injected script and create the masks objects.
- listen to the "console" state from the popup and deliver it to the injected script.
src/pages/Popup
Currently the popup is only connected to masks state on the page, eventually it will present the collected data from the page.