A collaborative Chrome extension that detects and skips lies in YouTube videos using AI analysis. Community-driven with shared analysis database for collective fact-checking.
LieBlocker is a public project where the community contributes to a shared fact-checking database.
- Shared Database: All analysis results are stored in a public Supabase database
- Community Contributions: Every user's analysis helps improve accuracy for everyone
- Open Source: Full transparency in how lies are detected and classified
- No Account Required: Anonymous contributions to the shared database
- Privacy-First: Only analysis results are shared, no personal data
- Row Level Security: Database policies prevent data tampering
- Rate Limiting: Prevents API abuse and spam submissions
- Input Validation: All contributions sanitized and validated
- No Personal Data: Only analysis results stored, no user information
- Public Transparency: All database access is logged and auditable
- Insert-Only Access: Anonymous users can only add new analysis data
- No Modifications: Existing analyses cannot be altered by public users
- Data Validation: Server-side constraints prevent malicious content
- Automatic Cleanup: Duplicate and spam entries automatically removed
- Community Moderation: Flagging system for inappropriate content
- Error Handling: Comprehensive error recovery and user feedback
- Performance Monitoring: Real-time performance tracking
- Retry Logic: Automatic retry for failed operations
- Graceful Degradation: Continues working even if database is unavailable
- Offline Mode: Works offline using cached analysis data
- Smart Notifications: Context-aware user feedback
- Progress Indicators: Clear progress for long operations
- Responsive Design: Works on all screen sizes
- Accessibility: Screen reader compatible
- Severity Filtering: Filter lies by severity level
- Community Insights: See analysis from other users
- Community Analytics: View collective fact-checking statistics
- Analysis Quality: Community-driven accuracy improvements
- Trending Lies: See commonly detected false claims
- Verification Status: Track fact-check verification across videos
- AI-Powered Detection: Analyzes video transcripts using OpenAI, Google Gemini, or OpenRouter
- Community Database: Shared analysis results benefit all users
- Auto-Skip Mode: Automatically jumps over detected lies while watching
- Visual Warnings: Shows detected lies with timestamps and explanations
- Configurable Confidence: Adjustable confidence threshold (0-100%)
- Severity Filtering: Filter displayed lies by severity (Critical, High, Medium, Low)
- Collaborative Verification: Community-driven fact verification
- Multiple AI Providers: Support for OpenAI, Google Gemini, and OpenRouter (including free models)
- Supabase Integration: Stores and retrieves analysis results efficiently
- Session Statistics: Tracks videos analyzed, lies detected, and time saved
- Sharp Timestamp Matching: Accurate lie-to-timestamp mapping for precise skipping
- Extended Analysis Duration: Analyze up to 180 minutes of video content
- Download or clone this repository
- Replace the placeholder credentials in
supabase-client.js:const SUPABASE_URL = 'https://your-project.supabase.co'; const SUPABASE_ANON_KEY = 'your-anon-key-here';
- Open Chrome and go to
chrome://extensions/ - Enable "Developer mode" in the top right
- Click "Load unpacked" and select the extension folder
- The LieBlocker icon will appear in your extensions toolbar
If you want your own private database:
- Create a new Supabase project
- Run all SQL migrations from
supabase/migrations/in your Supabase SQL editor - Update
supabase-client.jswith your project credentials - Modify RLS policies as needed for your use case
- Follow installation steps above
- Click the LieBlocker extension icon
- Go to Settings tab
- Choose your AI provider and add your API key:
- OpenAI: Get API key at https://platform.openai.com
- Google Gemini: Get API key at https://makersuite.google.com
- OpenRouter: Get API key at https://openrouter.ai (includes free models)
- Configure your preferences:
- Detection mode (visual warnings or auto-skip)
- Analysis duration (5-180 minutes)
- Confidence threshold (0-100%)
- Severity filtering (Critical, High, Medium, Low)
- AI provider and model
The extension automatically connects to the shared community database where:
- Your analysis results help improve accuracy for everyone
- You benefit from previous community analysis
- No personal information is stored or shared
- Navigate to any YouTube video
- Click the LieBlocker extension icon
- Click "Analyze Current Video"
- Wait for analysis to complete (contributes to community database)
- View detected lies in the "Lies" tab
- See analysis from other community members (if available)
- Filter lies by severity using the checkboxes in Settings
- If auto-skip is enabled, lies will be automatically skipped during playback
- Models: GPT-4o Mini (recommended), GPT-4o, GPT-4 Turbo, GPT-4
- API Key Format: Starts with
sk-and 51-56 characters long - Cost: ~$0.01-0.05 per video analysis
- Rate Limits: 50 requests per minute
- Models: Gemini 2.0 Flash Experimental (recommended), Gemini 1.5 Pro, Gemini 1.5 Flash
- API Key Format: 35-45 alphanumeric characters
- Cost: ~$0.005-0.02 per video analysis
- Rate Limits: 60 requests per minute
- Free Models:
- Meta: Llama 4 Maverick 17B (Free)
- Mistral: Mistral Small 3.2 24B (Free)
- DeepSeek: Deepseek R1 0528 Qwen3 8B (Free)
- API Key Format: Starts with
sk-or-and 20+ characters - Cost: Free models available, paid models ~$0.001-0.01 per analysis
- Rate Limits: 20 requests per minute for free models
┌─────────────────────────────────────┐
│ Security Service │
├─────────────────────────────────────┤
│ • Multi-layer Encryption │
│ • Rate Limiting │
│ • Input Validation │
│ • Error Handling │
│ • Context Validation │
└─────────────────────────────────────┘
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Content │ │ Background │ │ Popup │
│ Script │ │ Service │ │ Interface │
├─────────────────┤ ├─────────────────┤ ├─────────────────┤
│ • Transcript │ │ • State Mgmt │ │ • User Controls │
│ • AI Analysis │ │ • Notifications │ │ • Settings │
│ • Auto-Skip │ │ • Persistence │ │ • Statistics │
│ • Context Check │ │ • Rate Limiting │ │ • Filtering │
└─────────────────┘ └─────────────────┘ └─────────────────┘
YouTube Video → Transcript Extraction → AI Analysis → Lie Detection → User Interface
↓
Supabase Storage ← → Local Cache
↓
Severity Filtering → Display
- Algorithm: Multi-layer XOR + character substitution + Base64
- Key Generation: 1000-round hashing with secure salt
- Storage: Encrypted data with version control and expiration
- API Keys: Format and length validation for all providers
- Video IDs: YouTube ID format verification
- Timestamps: Range and type validation
- URLs: Protocol and domain restrictions
- Provider-Specific: Automatic rate limiting based on AI provider
- Free Model Support: Special handling for OpenRouter free models (20 req/min)
- Sliding Window: Advanced rate limiting with sliding window algorithm
- Storage Protection: 1000ms timeout protection
- Extension Context Validation: Prevents crashes during extension reloads
- Graceful Degradation: Continues working with cached data when context is invalid
- Safe Communication: All messages validated before sending
- Transcript Extraction: < 5 seconds
- AI Analysis: 30-120 seconds (depending on video length and provider)
- Lie Detection: 85%+ accuracy (configurable threshold)
- Memory Usage: < 50MB
- Storage Impact: < 10MB per 100 videos
- Caching: Intelligent result caching
- Lazy Loading: Components loaded on demand
- Debouncing: Input validation with 1s delay
- Cleanup: Automatic old data removal
- Provider Selection: Automatic rate limiting per provider
# Test API key encryption
npm run test:security
# Test rate limiting
npm run test:rate-limits
# Test input validation
npm run test:validation
# Test context invalidation handling
npm run test:context# Monitor memory usage
npm run test:memory
# Test operation timing
npm run test:performance
# Load testing
npm run test:load- API Key Issues: "Please check your AI API key in settings"
- Network Problems: "Network connection issue. Please check your internet"
- Rate Limits: "Rate limit exceeded. Please wait X seconds"
- Transcript Errors: "Could not extract video transcript"
- Context Issues: "Please refresh the page and try again"
- Error Queue: Last 100 errors with context
- Critical Errors: Persistent storage for debugging
- Performance Logs: Slow operation tracking
- User Actions: Non-PII usage patterns
- Context Validation: Extension state monitoring
# Development
NODE_ENV=development
# Supabase (Optional)
VITE_SUPABASE_URL=your_supabase_project_url
VITE_SUPABASE_ANON_KEY=your_supabase_anon_key// vite.config.js
export default defineConfig({
build: {
rollupOptions: {
input: {
popup: 'popup.html',
content: 'content.js',
background: 'background.js'
}
}
}
})- Chrome: ✅ Full support (Manifest V3)
- Edge: ✅ Full support (Chromium-based)
- Firefox:
⚠️ Limited (Manifest V2 compatibility needed) - Safari: ❌ Not supported (different extension system)
- ✅ Extended Analysis Duration: Now supports up to 180 minutes (was 60)
- ✅ OpenRouter Integration: Added support for free AI models
- ✅ Configurable Confidence: Adjustable threshold from 0-100% (default 85%)
- ✅ Severity Filtering: Filter displayed lies by severity level
- ✅ Context Validation: Robust handling of extension reloads
- ✅ Enhanced Rate Limiting: Provider-specific rate limits
- ✅ Improved Error Handling: Better user feedback and recovery
- ✅ Security Enhancements: Advanced encryption and validation
git clone https://github.com/your-repo/lieblocker
cd lieblocker
npm install
npm run dev- ESLint: Airbnb configuration
- Security: OWASP guidelines
- Performance: Core Web Vitals compliance
- Accessibility: WCAG 2.1 AA standards
MIT License - see LICENSE file for details
- "API key not configured": Add your AI API key in settings
- "Content script not responding": Refresh the YouTube page
- "Rate limit exceeded": Wait for the specified time before analyzing more videos
- "Transcript extraction failed": Video may not have captions available
- "Extension context invalidated": Refresh the page to reload the extension
- Check browser console for detailed error messages
- Export settings for configuration backup
- Clear cache if experiencing persistent issues
- Use different AI providers if one is having issues
- Best Free Option: OpenRouter with Meta Llama 4 Maverick 17B
- Fastest Free: OpenRouter with DeepSeek R1 0528 Qwen3 8B
- Most Accurate Free: OpenRouter with Mistral Small 3.2 24B
- Issues: GitHub Issues
- Security: security@lieblocker.com
- General: support@lieblocker.com
🆓 Free Usage: Use OpenRouter free models for cost-free lie detection with reasonable rate limits.