⚠️ IMPORTANT: This is a demonstration/proof-of-concept extension. Verdicts come from heuristic keyword matching and lightweight open-knowledge lookups, NOT from real fact-checking services. Do not rely on results for accurate information.
PopFact is a browser extension that demonstrates a CNN-style fact-checking ticker overlay. It showcases the UI/UX concept of real-time fact verification displays, but currently uses mock verdicts and contextual lookups for demonstration purposes only.
- ✅ Icons included: PNG icons (
icon16/48/128) are in the repo; regenerate withicons/generate-icons.shif needed. ⚠️ Demo-only data: Default provider uses public Wikipedia/Twitter lookups plus keyword heuristics; a fully offline mock provider is available in settings.⚠️ Store readiness: Privacy policy exists asPRIVACY_POLICY.mdbut still needs hosting; broad<all_urls>permission andinnerHTMLusage require review before submission.- ✅ Automated QA: 36 Playwright tests cover overlay basics, fact-checking flows, performance, and anti-fragility scenarios.
PopFact is a DEMONSTRATION ONLY:
- Uses heuristic keyword matching (e.g., "climate" → TRUE, "flat earth" → FALSE)
- Optional open-knowledge lookups (Wikipedia/Twitter context) but no verified fact-checking sources
- Does NOT provide accurate or reliable verification
- Should NOT be used for actual fact-checking
For real fact-checking, visit: Snopes, FactCheck.org, PolitiFact
📺 CNN-Style News Ticker
- Fixed overlay at bottom of browser viewport
- Horizontal scrolling fact-check results
- Color-coded verdicts (Green = True, Red = False, Yellow = Mixed, Gray = Unverified)
🔍 Text Analysis (Demo Mode)
- Extracts claims from web page text
- Identifies declarative statements
- Matches against keyword patterns
- Displays mock results in ticker
⚡ Real-time Processing
- Automatic detection of declarative statements
- Background processing with intelligent caching
- Configurable confidence thresholds
- Optional open-knowledge context (Wikipedia + Twitter) with no API keys required, plus a mock provider for fully offline demos
🎛️ Customizable Settings
- Ticker speed control
- Confidence threshold adjustment
- Enable/disable content types
- API provider selection (for future real integration)
-
Clone this repository:
git clone https://github.com/PetrefiedThunder/PopFact.git cd PopFact -
PNG icons included (regenerate only if needed):
See GENERATE_ICONS.md for detailed instructions.
Quick method with ImageMagick:
cd icons convert icon.svg -resize 16x16 icon16.png convert icon.svg -resize 48x48 icon48.png convert icon.svg -resize 128x128 icon128.png -
Load in Chrome:
- Open
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked"
- Select the
PopFactdirectory
- Open
-
Load in Firefox:
- Open
about:debugging#/runtime/this-firefox - Click "Load Temporary Add-on"
- Select
manifest.json
- Open
Coming soon - See Production Deployment for store submission status.
- Visit any webpage (news sites work best)
- Watch the ticker appear at the bottom of the page
- See fact-checks scroll with color-coded verdicts
- Click extension icon to access settings
The ticker will automatically:
- Extract text from
<p>,<h1>,<h2>,<h3>elements - Identify up to 5 potential factual claims
- Match them against keyword patterns
- Display results in the scrolling ticker
1. Scan page for paragraph and heading elements
2. Split text into sentences
3. Filter for declarative statements (>40 chars, >6 words)
4. Send first 5 claims to background script1. Normalize claim text to lowercase
2. Check for keyword patterns:
- "covid" → MIXED
- "2020 election" → FALSE
- "earth is round", "vaccines work" → TRUE
- "climate", "warming" → TRUE
- "flat earth" → FALSE
- Other → UNVERIFIED
3. Return mock verdict with explanation1. Receive results from background script
2. Create ticker items with appropriate color class
3. Duplicate content for seamless scrolling
4. Animate with CSS transform- Configure Settings: Click the extension icon to access settings and statistics
- Send Wrap-up Email: From the popup, choose "Send Wrap-up Email" to launch an email draft with a spreadsheet-style summary of the latest fact checks
- Chrome 88+ or Firefox 89+
- Node.js (optional, for development tools)
- ImageMagick or image editor (for icon generation)
# Validate extension files
./validate.sh
# Run in Chrome
chrome://extensions/ → Load unpacked
# Test on these sites
- https://www.cnn.com
- https://www.bbc.com
- https://www.nytimes.comOpen DevTools (F12) and check console for:
PopFact: Overlay initialized
PopFact: Extracted 5 claims for fact-checking
PopFact: Processing fact-check request: [claim text]
See DEBUG.md for comprehensive debugging guide.
- Node.js 18+ (for development tools)
- Chrome or Firefox browser
- No API keys required for the demo providers
❌ NOT READY FOR PRODUCTION - Before any store submission:
- Host
PRIVACY_POLICY.mdat a public URL and reference it in listings. - Review and possibly reduce
<all_urls>permission (currently required for demo coverage). - Replace
innerHTMLusage flagged incontent.jswith safer DOM methods. - Keep store description aligned with the "Demo" positioning (see
manifest.json).
PopFact includes a comprehensive QA test suite built with Playwright (36 tests across overlay basics, mock fact-checking, performance, and anti-fragility).
Quick Start:
# Install dependencies
npm install
# Install Playwright browsers
npx playwright install chromium
# Run all tests
npm test
# Run tests with UI
npm run test:uiTest Categories:
- Basic Overlay Tests - Core functionality (9 tests)
- Fact-Checking Tests - Mocked AI responses (9 tests)
- Performance Tests - < 200ms load time (8 tests)
- Anti-Fragility Tests - Edge cases and resilience (11 tests)
Key Features:
- 🚫 No live API calls (all responses mocked)
- ⚡ Performance guardrails (< 200ms overlay load)
- 🎯 Resilient selectors (works with HTML changes)
- 📊 36 comprehensive tests
For detailed testing documentation, see TESTING.md and tests/README.md.
- Load the extension in developer mode
- Visit any news website or article
- Open the browser console to see PopFact logs
- Watch the ticker for fact-check results
- ✅ Generate PNG icons (
GENERATE_ICONS.md) ⚠️ Host privacy policy publicly- ✅ Update descriptions to say "Demo"
- ✅ Add disclaimer on install
- ✅ Replace innerHTML with safe DOM methods
⚠️ Create store screenshots⚠️ Test thoroughly
- Quick Start: QUICK_START_PRODUCTION.md (4-hour guide)
- Full Audit: PRODUCTION_AUDIT.md (complete compliance)
- Checklist: Generated by
./prepare-production.sh
v1.0 (Current) - Demo with Mock Data
- ✅ CNN-style ticker overlay
- ✅ Text extraction from pages
- ✅ Mock keyword-based fact-checking
- ✅ Color-coded verdicts
- ✅ Settings UI
v1.1 (Planned) - Enhanced Demo
- Improved claim detection
- More keyword patterns
- Better ticker animation
- Keyboard shortcuts
- Dark mode support
v2.0 (Future) - Real Fact-Checking
- Integration with fact-checking APIs (OpenAI, Claude, Google Fact Check)
- Machine learning claim classification
- Source attribution
- User-submitted fact-checks
- Browser action for per-site control
v3.0 (Vision) - Advanced Features
- Audio transcription and fact-checking
- Video caption extraction
- Multi-language support
- Community fact-checking
- Browser-native implementation
The extension is designed to support real fact-checking APIs:
// Example: OpenAI integration (not yet implemented)
async function performFactCheck(claim) {
const response = await fetch('https://api.openai.com/v1/chat/completions', {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'gpt-4',
messages: [{
role: 'user',
content: `Fact-check: "${claim}"`
}]
})
});
// Process response...
}See API_INTEGRATION.md for integration examples.
PopFact respects your privacy:
- ✅ All processing happens locally in your browser
- ✅ No data sent to external servers
- ✅ No tracking or analytics
- ✅ No personal information collected
- ✅ Settings stored locally only
See PRIVACY_POLICY.md for full details.
Contributions welcome! Please read CONTRIBUTING.md for guidelines.
Areas for contribution:
- Improved claim detection algorithms
- Additional keyword patterns for mock data
- UI/UX enhancements
- Real API integrations
- Documentation improvements
- Bug fixes and testing
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Copyright 2024 PetrefiedThunder
Licensed under the Apache License, Version 2.0
- Inspired by VH1's Pop-Up Video
- News ticker design inspired by CNN, BBC, Fox News
- Built with Chrome Extensions Manifest V3
- Open source community
- GitHub Issues: Report bugs or request features
- Discussions: Ask questions
- Documentation: Check the
/docsfolder or.mdfiles - Email: [Coming soon]
THIS EXTENSION IS FOR DEMONSTRATION PURPOSES ONLY.
PopFact uses heuristic keyword matching and lightweight open-knowledge lookups—not verified fact-checking services. Results are mock/demo data and should NOT be considered factual. Always verify important information through authoritative fact-checking sources like Snopes, FactCheck.org, or PolitiFact.
By installing this extension, you acknowledge:
- Results are mock/demonstration data
- Extension should NOT be used for actual fact verification
- You will NOT rely on results for important decisions
- You understand this is a proof-of-concept only
Made with ❤️ for truth, accuracy, and good UI/UX
Status: Demo/Proof-of-Concept | Version: 1.0.0 | Updated: 2025-11-23