- JavaScript 79.6%
- CSS 13.9%
- HTML 5.7%
- Python 0.8%
Firefox Lightbeam
This is an add-on for visualizing HTTP requests between websites in real time, originally developed by Mozilla.
Mozilla stopped the development in 2019 (https://support.mozilla.org/en-US/kb/lightbeam-extension-firefox-no-longer-supported) and the source code (https://github.com/mozilla/lightbeam-we) of that project was used to create this fork.
Quick Start
Clone the repository
Note This repository uses a submodule to allow some third party requests. To ensure the submodule is cloned along with this repository, use a modified clone command:
git clone --recursive https://codeberg.org/chikl/Lightbeam.git
Run the web extension
There are a couple ways to try out this web extension:
-
Open Firefox and load
about:debuggingin the URL bar.- Click the on "This Firefox" on the left side and on the button "Load Temporary Add-on" and select the
manifest.jsonfile within the directory of this repository. - You should now see the Lightbeam icon on the top right bar of the browser.
- Click the Lightbeam icon to launch the web extension.
- Click the on "This Firefox" on the left side and on the button "Load Temporary Add-on" and select the
-
Install the web-ext tool, change into the
srcdirectory of this repository, and typeweb-ext run.- This will launch Firefox and install the extension automatically.
- This tool gives you some additional development features such as automatic reloading.
- Alternatively, you can run
yarn devto start Firefox with the extension. - For Firefox on Android you can run
yarn dev:android. Therefore, you have to enable USB-Debugging on your device and plug it into your computer. Also, this works only if you connected only one device with the computer and not with multiple.
Development Guide
Prepare your development environment
This repo is using the package manager yarn. Use the
official documentation with
installation instructions.
Download dependencies and build the extension
Run yarn to build dependencies.
Run yarn prepare to enable husky (to run linting before commits) and clone the submodule.
Run yarn build.
Update the submodule
To manually update the submodule at any time during development, run git submodule update --remote.
Debugging
Desktop
For most things the web console
of the developer tools is sufficient. If you implement something in the background
script you won't see logs in the normal web console. In this case run the extension
and load about:debugging in the URL bar. Click on "This Firefox"
on the left side then you should be able to see Lightbeam in the list. Click
"Inspect" and you will see a console where the background script logs are visible.
For more information have a look at the official documentation.
Android
Above you can see how to run the extension on Android. For the debugging part visit the official documentation.
Testing
Run yarn test for functional tests.
Run yarn lint to check if formatting etc. is OK.
Eslint is used for linting. Mocha & Chai are used for unit testing. See the file package.json for the details what the commands above do.
Assets
- Icons: Microsoft Fluent Icons (https://github.com/microsoft/fluentui-system-icons)
- Google Logo: https://about.google/brand-resource-center/logos-list/
- Facebook Logo: https://about.meta.com/brand/resources/facebookapp/logo
- Cloudflare Logo: https://www.cloudflare.com/logo/
- Amazon Logo: https://upload.wikimedia.org/wikipedia/commons/a/a9/Amazon_logo.svg (edited)
- Microsoft Logo: https://upload.wikimedia.org/wikipedia/commons/4/44/Microsoft_logo.svg