Thanks for your interest in contributing! Here's how to get started.
-
Clone the repo:
git clone https://github.com/ctala/api-reverse-engineer.git cd api-reverse-engineer -
Load in Chrome:
- Open
chrome://extensions/ - Enable Developer Mode
- Click Load unpacked → select the project folder
- Open
-
After any change to
src/orpopup.html:- Go to
chrome://extensions/ - Click the 🔄 refresh button on the extension card
- Go to
The extension has 4 layers:
| File | Context | Role |
|---|---|---|
popup.js |
Extension popup | UI, start/stop/download |
background.js |
Service worker | State, dedup, storage |
content.js |
Extension (per tab) | Bridge between page and extension |
injected.js |
Page JavaScript | Patches fetch and XHR |
Important: injected.js runs in the page's own JS context via a <script> tag injection. This is the only way to intercept real fetch calls before they go out.
Add it to the entry object in injected.js, then update the popup rendering in popup.js.
Add a handler in background.js (message type EXPORT_FORMAT_X) and a button in popup.html + popup.js.
The current filter is a simple url.includes(filter) check in content.js. For regex support, parse the filter string and use new RegExp(filter).test(url).
- Keep
injected.jsas small as possible — it runs on every page - No external dependencies — the extension must work offline
- Test on Chrome stable before submitting a PR
- Describe your change clearly in the PR description
Open a GitHub Issue with:
- Chrome version
- What you were capturing (site type, not necessarily the actual site)
- What happened vs what you expected
- Any console errors (from the extension's service worker or the page)