You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
2.6 KiB
41 lines
2.6 KiB
<!--
|
|
CO_OP_TRANSLATOR_METADATA:
|
|
{
|
|
"original_hash": "fab4e6b4f0efcd587a9029d82991f597",
|
|
"translation_date": "2025-08-28T11:27:00+00:00",
|
|
"source_file": "5-browser-extension/solution/README.md",
|
|
"language_code": "en"
|
|
}
|
|
-->
|
|
# Carbon Trigger Browser Extension: Completed Code
|
|
|
|
Using tmrow's CO2 Signal API to monitor electricity consumption, create a browser extension that provides a reminder directly in your browser about the intensity of electricity usage in your region. Using this extension on the fly can help you make informed decisions about your activities based on this data.
|
|
|
|

|
|
|
|
## Getting Started
|
|
|
|
You will need to have [npm](https://npmjs.com) installed. Download a copy of this code to a folder on your computer.
|
|
|
|
Install all the required packages:
|
|
|
|
```
|
|
npm install
|
|
```
|
|
|
|
Build the extension using webpack:
|
|
|
|
```
|
|
npm run build
|
|
```
|
|
|
|
To install on Edge, open the 'three dot' menu in the top right corner of the browser to access the Extensions panel. From there, select 'Load Unpacked' to add a new extension. When prompted, open the 'dist' folder, and the extension will load. To use it, you will need an API key for CO2 Signal's API ([get one here via email](https://www.co2signal.com/) - enter your email in the box on this page) and the [code for your region](http://api.electricitymap.org/v3/zones) corresponding to the [Electricity Map](https://www.electricitymap.org/map) (for example, in Boston, I use 'US-NEISO').
|
|
|
|

|
|
|
|
Once you input the API key and region into the extension interface, the colored dot in the browser extension bar will update to reflect your region's energy usage. It will also provide guidance on which energy-intensive activities might be suitable for you to undertake. The idea for this 'dot' system was inspired by the [Energy Lollipop extension](https://energylollipop.com/) for California emissions.
|
|
|
|
---
|
|
|
|
**Disclaimer**:
|
|
This document has been translated using the AI translation service [Co-op Translator](https://github.com/Azure/co-op-translator). While we aim for accuracy, please note that automated translations may include errors or inaccuracies. The original document in its native language should be regarded as the authoritative source. For critical information, professional human translation is advised. We are not responsible for any misunderstandings or misinterpretations resulting from the use of this translation. |