A cross-browser extension that displays SDG (Sustainable Development Goals) classification badges as floating widgets on webpages using the Aurora SDG API.
- Dual Analysis Modes:
- Page Mode: Analyzes full webpage content
- Select Mode: Analyzes user-selected text with real-time updates
- Floating Widget: Customizable wheel-style badge with draggable positioning
- Cross-Browser Support: Compatible with Chrome, Firefox, Edge, and Safari
- Responsive Design: Adapts to different screen sizes and webpage layouts
- Rate Limiting: Complies with Aurora SDG API rate limits (5 requests/second)
- Visual Feedback: Loading states, error handling, and confidence scores
- Download the extension files
- Rename
manifest-v3.json
tomanifest.json
- Open Chrome/Edge and navigate to
chrome://extensions/
oredge://extensions/
- Enable "Developer mode"
- Click "Load unpacked" and select the extension directory
- Download the extension files
- Rename
manifest-v2.json
tomanifest.json
- Open Firefox and navigate to
about:debugging
- Click "This Firefox" → "Load Temporary Add-on"
- Select the
manifest.json
file
- Download the extension files
- Use Safari's Extension Builder or convert using Safari Extension Converter
- Follow Safari's extension installation process
- Installation: Install the extension in your browser
- Activation: The extension automatically activates on all webpages
- Settings: Click the extension icon to open the settings popup
- Mode Selection:
- Page Mode: Automatically analyzes the full webpage content
- Select Mode: Select any text on the page to get instant SDG classification
- Customization: Adjust badge size (150px - 400px) using the slider
- Positioning: Drag the floating widget to your preferred location
The extension integrates with the Aurora SDG API:
- Endpoint:
https://aurora-sdg.labs.vu.nl/classifier/classify/aurora-sdg-multi
- Method: POST with JSON payload
- Rate Limit: 5 requests per second
- Response: SDG predictions with confidence scores and icon URLs
sdg-badge-extension/
├── manifest-v3.json # Chrome/Edge manifest
├── manifest-v2.json # Firefox manifest
├── icons/ # Extension icons
│ ├── icon16.png
│ ├── icon48.png
│ └── icon128.png
├── popup/ # Settings popup
│ ├── popup.html
│ ├── popup.css
│ └── popup.js
├── scripts/ # Extension scripts
│ ├── background.js # Background service worker
│ └── content.js # Content script for webpage interaction
└── README.md # This file
- Basic knowledge of browser extension development
- Understanding of Chrome Extension APIs
- Familiarity with JavaScript, HTML, and CSS
- Clone or download the extension files
- Make modifications as needed
- Load the extension in developer mode
- Test functionality across different websites
- Debug using browser developer tools
- Test on various websites with different content structures
- Verify text selection works correctly
- Ensure API rate limiting is respected
- Test widget positioning and responsiveness
- Validate cross-browser compatibility
Browser | Manifest Version | Status |
---|---|---|
Chrome | V3 | ✅ Supported |
Edge | V3 | ✅ Supported |
Firefox | V2 | ✅ Supported |
Safari | V2 |
The extension requires the following permissions:
activeTab
: Access to the current webpage for content analysisstorage
: Save user preferences and settingsscripting
: Inject content scripts for widget functionalityhost_permissions
: Access to Aurora SDG API endpoints
- Fork the repository
- Create a feature branch
- Make your changes
- Test across browsers
- Submit a pull request
This extension is provided as-is for educational and research purposes. The Aurora SDG API is provided by VU Amsterdam.
For issues or questions:
- Check the browser console for error messages
- Verify internet connectivity for API access
- Ensure the extension has proper permissions
- Test on different websites to isolate issues
- Aurora SDG API: Provided by VU Amsterdam
- SDG Classification: Based on the United Nations Sustainable Development Goals
- Widget Design: Inspired by accessibility and user experience best practices