A simple Chrome extension that estimates the carbon footprint of any webpage you visit.
CarbonBrowse estimates COβ emissions based on page data transfer size using a simplified formula:
1 MB of data transfer β 0.2 grams of COβ
This is an educational estimate, not a precise measurement.
- Page size estimation using the Performance API (with fallback to HTML length)
- COβ calculation displayed in a clean popup
- Color-coded impact indicator:
- πΏ Green β Low impact (
< 0.1g COββ) - π€οΈ Yellow β Moderate impact (
0.1g β 0.5g COβ) β οΈ Red β Heavy page (> 0.5g COββ)
- πΏ Green β Low impact (
- Eco-friendly message to raise awareness
- Landing page with installation instructions and extension preview
βββ footprint/
β βββ manifest.json # Extension manifest (permissions, scripts)
β βββ content.js # Injected into pages β calculates page size
β βββ popup.html # Extension popup UI
β βββ popup.css # Green-themed popup styling
β βββ popup.js # Popup logic β communicates with content.js
.js
content.jsruns on every webpage and calculates total page size:- Uses
performance.getEntriesByType("resource")to sumtransferSize/encodedBodySize - Adds main document size via
performance.getEntriesByType("navigation") - Falls back to
document.documentElement.innerHTML.lengthif the Performance API returns nothing
- Uses
popup.jssends a message tocontent.js, receives the page size in MB, multiplies by0.2to get estimated COβ, and displays the resultpopup.html+popup.cssrender a clean, green-themed card UI
- Download or clone this repository
- Open
chrome://extensionsin Chrome - Enable Developer Mode (top-right toggle)
- Click Load unpacked
- Select the
public/extensionfolder - Click the CarbonBrowse icon on any webpage to see its carbon footprint
| Layer | Technology |
|---|---|
| Chrome Extension | Vanilla JS, Manifest V3 |
npm install
npm run devvBuilt for Hack Club . Use freely.