A minimal Firefox extension that intercepts every WebSocket frame on the current page and lets you inspect and export them.
- Captures sent and received frames in real time, including binary (Blob / ArrayBuffer) messages
- Tracks connection lifecycle events (open, close, error)
- Filters by direction (sent / received / open-close) and free-text search
- Detail panel with automatic JSON pretty-print
- One-click export as JSON or CSV
injected.js patches window.WebSocket inside the page context
↓ CustomEvent
content_script.js bridges the page ↔ extension boundary
↓ runtime.sendMessage
background.js stores frames per tab, notifies the popup
↓ runtime.sendMessage
popup.js renders the UI and handles exports
The key constraint is that a content script runs in an isolated sandbox and cannot patch window.WebSocket directly. injected.js is loaded as a regular <script> tag so it executes in the page's own JavaScript context.
- Open Firefox and navigate to
about:debugging - Click This Firefox → Load Temporary Add-on…
- Select the
manifest.jsonfile from this folder
The extension stays active until Firefox is restarted. For a permanent install, sign the extension via addons.mozilla.org.
| File | Role |
|---|---|
manifest.json |
Extension manifest (Manifest V2) |
injected.js |
WebSocket proxy injected into the page context |
content_script.js |
Injects the script and relays events to the background |
background.js |
Stores frames per tab and pushes updates to the popup |
popup.html |
Popup markup and styles |
popup.js |
Popup logic (rendering, filtering, export) |
MIT © 2026 Teyko — see LICENSE.
- Firefox only (uses
browser.*APIs and Manifest V2browser_action) - Frames sent before the content script runs (very early
document_startcode) may be missed on extremely fast connections - Binary frames are decoded as UTF-8 text via
Blob.text()
