A Chrome extension that automatically analyzes Terms of Service and Privacy Policy content to identify potential risks and harmful clauses.
- ๐ Automatically detects Terms of Service and Privacy Policy links on web pages
- ๐ค AI-powered analysis using OpenRouter API (optional)
- ๐ Risk level assessment (Low, Medium, High)
- ๐จ Identifies red flags and concerning clauses
- ๐ก Provides recommendations for users
- ๐จ Clean, intuitive popup interface
- Clone or download this repository
- Configure API (optional):
- Copy
config.template.jstoconfig.js - Add your OpenRouter API key to
config.js - If no API key is provided, the extension will use mock analysis
- Copy
- Install the extension:
- Open Chrome and go to
chrome://extensions/ - Enable "Developer mode" in the top right
- Click "Load unpacked" and select this extension folder
- Open Chrome and go to
- Start browsing - the extension will automatically analyze pages with Terms of Service content
- Detection: Content script scans web pages for Terms of Service and Privacy Policy links
- Analysis: Background script processes found content using either:
- OpenRouter API for real AI analysis (if configured)
- Built-in mock analysis with pattern matching
- Results: Popup displays risk assessment, red flags, and recommendations
- Badge: Extension badge shows risk level for quick visual reference
manifest.json- Extension configurationbackground.js- Service worker for content processingcontent.js- Content script for page scanningpopup.html/js/css- User interfaceanalyzer.js- Terms analysis logicconfig.js- API configuration (not tracked in git)icons/- Extension icons
The extension supports OpenRouter API for enhanced AI analysis:
- Sign up at OpenRouter.ai
- Get your API key
- Add it to
config.js
Without an API key, the extension uses built-in pattern matching for basic analysis.
- API keys are stored locally and not transmitted except to the configured API
- No user data is collected by the extension itself
- All analysis happens locally or via your configured API
To modify or extend the extension:
- Make changes to the source files
- Reload the extension in
chrome://extensions/ - Test on various websites with Terms of Service pages
MIT License - see LICENSE file for details
- Automatic Detection: Scans web pages for Terms of Service and Privacy Policy links
- Risk Assessment: Analyzes content and provides Low/Medium/High risk ratings
- Red Flag Identification: Highlights concerning clauses like mandatory arbitration, liability waivers, etc.
- Clean UI: Modern popup interface with color-coded risk indicators
- Detailed Analysis: Full breakdown of findings with categorized concerns
- Export Reports: Save analysis results for future reference
- Production Ready: Comprehensive error handling and modular architecture
Termily/
โโโ manifest.json # Extension manifest (Manifest V3)
โโโ background.js # Service worker for tab monitoring
โโโ content.js # Content script for page scanning
โโโ analyzer.js # Mock LLM analysis engine
โโโ popup.html # Extension popup interface
โโโ popup.js # Popup JavaScript logic
โโโ popup.css # Popup styling and themes
โโโ icons/ # Extension icons (16, 32, 48, 128px)
โ โโโ README.md # Icon creation guidelines
โโโ README.md # This file
Create the required icon files in the icons/ directory:
icon-16.png(16x16px)icon-32.png(32x32px)icon-48.png(48x48px)icon-128.png(128x128px)
See icons/README.md for design guidelines.
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode" (toggle in top right)
- Click "Load unpacked"
- Select the
Termilyfolder - The extension should appear in your extensions list
- Visit any website with Terms of Service or Privacy Policy links
- Click the Termily extension icon in your toolbar
- The extension will automatically scan and analyze the page
- View results in the popup interface
The extension currently uses mock analysis. To integrate with a real LLM API:
-
Update
analyzer.js:const ANALYSIS_CONFIG = { API_ENDPOINT: 'https://your-api-endpoint.com/analyze', API_KEY: 'YOUR_ACTUAL_API_KEY_HERE' };
-
Implement Real API Call: Replace the
analyzeWithRealAPI()function inanalyzer.jswith your actual API integration. -
Update Background Script: Modify
background.jsto use real API instead of mock analysis.
Currently uses hardcoded configuration. Future versions will include:
- API endpoint configuration
- Risk threshold customization
- Analysis sensitivity settings
- Custom keyword patterns
- Content script runs on all web pages
- Searches for Terms/Privacy Policy links using keyword detection
- Extracts text content when possible
- Sends extracted content to analyzer module
- Mock analysis simulates LLM processing
- Identifies risk patterns and concerning clauses
- Calculates overall risk score
- Background script stores analysis results
- Popup displays color-coded risk assessment
- Shows key concerns and recommendations
- Provides detailed analysis modal
- ๐ข LOW RISK (0-19 points): Standard terms with minimal user risk
- ๐ก MEDIUM RISK (20-49 points): Some concerning clauses present
- ๐ด HIGH RISK (50+ points): Multiple harmful terms that favor company
- Mandatory arbitration clauses
- Class action waivers
- Unlimited liability terms
- No-notice termination rights
- Personal data selling permissions
- Content licensing overreach
- Liability limitations
- Legal Terms: Arbitration, governing law, dispute resolution
- Privacy & Data: Collection, sharing, third-party access
- Liability & Risk: User indemnification, company protections
- Termination: Account suspension, service discontinuation
- Clean, modern design with gradients
- Color-coded risk indicators (green/yellow/red)
- Expandable detailed analysis
- One-click report sharing
- Accessibility support (keyboard navigation, high contrast)
- Extension badge shows risk level
- Animated loading states
- Toast notifications
- Modal overlays for detailed views
activeTab: Access current tab for content analysisscripting: Inject content scripts for page scanningstorage: Cache analysis results locally
- No personal data collection
- Analysis results stored locally only
- No tracking or analytics
- Content sent to API only for analysis (configurable)
- Network failure recovery
- Invalid content handling
- API timeout management
- Extension context errors
- User-friendly error messages
- Console logging for development
- Error state display in UI
- Retry mechanisms for failed operations
- Graceful degradation
- Load extension in development mode
- Visit various websites with terms pages
- Check console for errors/warnings
- Test popup functionality and UI states
- Verify analysis accuracy
- Use Chrome DevTools for content script debugging
- Check extension service worker console
- Monitor network requests for API calls
- Test error scenarios and edge cases
- Create proper extension icons
- Configure real API integration
- Test thoroughly across websites
- Create store listing assets
- Submit for review
- Replace mock analysis with real API
- Add proper error reporting
- Implement user settings
- Create help documentation
- Set up feedback collection
- Add usage analytics (optional)
- Real-time analysis with streaming results
- Custom risk threshold configuration
- Terms comparison between services
- Historical analysis tracking
- Browser sync for analysis results
- Multilingual support
- Corporate/enterprise features
- OpenAI GPT-4 for analysis
- Anthropic Claude for legal interpretation
- Custom legal AI models
- Terms database integration
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: Report bugs on GitHub Issues
- Feature Requests: Open enhancement requests
- Documentation: Check wiki for additional help
- Contact: Email support for urgent matters
- Inspired by privacy advocacy tools
- Built with Chrome Extensions Manifest V3
- Uses modern web technologies
- Community feedback and contributions