A Chrome extension that analyzes web pages for scam indicators using OpenRouter's AI models and provides a safety score from 0-100.
- Real-time Analysis: Scans the current web page content for scam indicators
- Safety Score: Provides a score from 0 (safe) to 100 (definitely a scam)
- Analysis Details: Shows detailed motivation for why the score was assigned
- Visual Feedback: Color-coded results with clear safety messages
- Modern UI: Clean, intuitive interface with gradient design
- Lightweight: Minimal impact on browser performance
- Content Extraction: The extension extracts page content including text, links, forms, and metadata
- AI Analysis: Sends the content to OpenRouter's Gemini 2.5 Flash model for intelligent scam detection
- Score Display: Shows the safety score with visual indicators and detailed explanations
-
Clone or Download this repository to your local machine
-
Add Icon Files (Required):
- Navigate to the
icons/directory - Follow the instructions in
icons/README.mdto create the required PNG files:icon16.png(16x16 pixels)icon48.png(48x48 pixels)icon128.png(128x128 pixels)
- Navigate to the
-
Load Extension in Chrome:
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode" (toggle in top right)
- Click "Load unpacked"
- Select the folder containing the extension files
- The Scamdar extension should now appear in your extensions list
- Open Chrome and navigate to
-
Pin Extension (Optional):
- Click the extensions icon (puzzle piece) in Chrome toolbar
- Find Scamdar and click the pin icon to keep it visible
-
Configure OpenRouter API Key:
- Get an API key from OpenRouter
- Click the Scamdar extension icon in your toolbar
- Click the settings button (βοΈ) in the top right
- Enter your OpenRouter API key and click "Save"
- You should see "β Ready to scan" status
- Navigate to any website you want to analyze
- Click the Scamdar extension icon in your browser toolbar
- Click the "Scan Current Page" button
- View Results: The extension will display:
- A safety score (0-100)
- Color-coded risk level (Green/Orange/Red)
- Safety message and recommendations
- Detailed analysis motivation explaining the scoring
- Link to this GitHub repository for updates and support
- 0-30 (Green): Low risk - Website appears safe
- 31-70 (Orange): Moderate risk - Exercise caution
- 71-100 (Red): High risk - Likely scam, avoid interaction
scamdar/
βββ manifest.json # Extension configuration
βββ popup.html # Extension popup UI
βββ popup.js # Popup functionality
βββ background.js # Service worker for API calls
βββ content.js # Content extraction script
βββ styles.css # UI styling
βββ icons/ # Extension icons
β βββ README.md # Icon creation instructions
β βββ icon16.png # 16x16 toolbar icon
β βββ icon48.png # 48x48 management icon
β βββ icon128.png # 128x128 store icon
βββ README.md # This file
The extension uses OpenRouter to access advanced AI models:
- Endpoint:
https://openrouter.ai/api/v1/chat/completions - Model:
google/gemini-2.5-flash - Authentication: Bearer token with your OpenRouter API key
- Headers: Includes
X-Title: Scamdar-Chrome-Extensionfor proper attribution - Analysis: AI model returns JSON with
score(0-100) andmotivationexplaining the assessment
The extension analyzes:
- Complete HTML source code of the page
- Page text content (up to 10,000 characters)
- All links and their destinations
- Form inputs and structure
- Page metadata and meta tags
- Domain and protocol information
- Page title and URL
- API Key Storage: Your OpenRouter API key is stored locally in Chrome's sync storage
- No Personal Data: Only analyzes public page content
- No Tracking: Does not store or track user browsing
- Secure Communication: Uses HTTPS for all API calls to OpenRouter
- Local Processing: Content extraction happens locally, only summarized data sent to AI
- Chrome browser
- OpenRouter account and API key (Sign up here)
- Basic knowledge of Chrome extension development
- OpenRouter Account: Create a free account at OpenRouter
- API Key: Generate an API key in the OpenRouter Keys section
- Credits: Add credits to your OpenRouter account for API usage (Gemini 2.5 Flash is very affordable)
- Load the extension in developer mode
- Test on various websites (safe and suspicious)
- Check console logs for any errors
- Verify API responses are properly handled
- Styling: Modify
styles.cssfor UI changes - AI Model: Change
MODELconstant inbackground.jsto use different OpenRouter models - Analysis Prompt: Modify the analysis prompt in
analyzeWithOpenRouter()function - Content Extraction: Enhance
extractPageContent()incontent.js - UI Messages: Update safety messages in
popup.js
- Ensure all files are present in the directory
- Check that icon files exist in the
icons/folder - Verify manifest.json is valid JSON
- API Key Issues: Ensure your OpenRouter API key is correctly entered in settings
- Credits: Check that your OpenRouter account has sufficient credits
- Network: Verify internet connectivity and that OpenRouter.ai is accessible
- Console Errors: Check browser console (F12) for detailed error messages
- Permissions: Ensure content script permissions are granted
- 401 Unauthorized: Invalid or missing API key - check your key in settings
- 429 Rate Limited: Too many requests - wait a moment before trying again
- 402 Payment Required: Insufficient credits - add credits to your OpenRouter account
- Model Unavailable: The Gemini model may be temporarily unavailable
- Clear browser cache and reload extension
- Check if CSS files are loading properly
- Verify popup dimensions work on your screen
- Chrome: Fully supported (Manifest V3)
- Edge: Should work with Chromium-based Edge
- Firefox: Not compatible (uses different extension API)
For issues or questions:
- Check the troubleshooting section above
- Review browser console (F12) for error messages
- Verify your OpenRouter account status and credits
- Test on multiple websites to isolate issues
This project is provided as-is for educational and security purposes. It is governed by the MIT License. See the LICENSE file for more information.