A Chrome browser extension that analyzes the credibility of Reddit posts in real-time, helping users identify potentially misleading or unverified content.
Credify is a misinformation checker for Reddit that automatically injects credibility analysis buttons into Reddit posts. When clicked, it provides users with a credibility score, detected flags, and detailed analysis to help them make informed decisions about the content they're viewing.
- Automatic Button Injection: Dynamically adds "Credify Post" buttons to Reddit posts using MutationObserver
- Real-time Analysis: Provides instant credibility scoring on a 10-point scale
- Flag Detection: Identifies potential issues such as unverified sources and disputed claims
- Beautiful UI: Modern, responsive modal interface with smooth animations
- Post Tracking: Prevents duplicate buttons and caches analysis results
- Multi-context Support: Works on both Reddit feeds and individual post pages
- Shadow DOM Compatibility: Handles Reddit's complex DOM structure including shadow roots
- Clone this repository:
git clone https://github.com/yourusername/MutationObserve.git
cd MutationObserve-
Open Chrome and navigate to
chrome://extensions/ -
Enable "Developer mode" (toggle in the top-right corner)
-
Click "Load unpacked" and select the project directory
-
The Credify icon should appear in your Chrome toolbar
Note: This extension is currently in development and not yet published to the Chrome Web Store.
-
Navigate to Reddit: Visit any Reddit page (e.g., https://reddit.com/r/all)
-
Look for the Button: Credify automatically injects "π Credify Post" buttons on Reddit posts
-
Click to Analyze: Click the button on any post to analyze its credibility
-
View Results: A modal will appear showing:
- Credibility score (0-10)
- Visual score indicator with color coding
- Post details (title, ID, subreddit)
- Detected flags and warnings (if any)
-
Use the Popup: Click the Credify icon in your toolbar to see information about the current post
The extension consists of three main components:
-
Content Script (
contentScript.js)- Runs directly on Reddit pages
- Uses MutationObserver to detect new posts
- Extracts post metadata (ID, title, subreddit)
- Injects credibility check buttons
- Handles button interactions
-
Background Service Worker (
background.js)- Monitors tab navigation
- Coordinates communication between components
- Stores analysis results in Chrome's local storage
-
Credibility Modal (
credibilityModal.js)- Manages the UI for displaying analysis results
- Provides loading states and animations
- Handles modal interactions (close, keyboard shortcuts)
sequenceDiagram
User->>Reddit Page: Opens Reddit
Content Script->>Reddit Page: Injects buttons
User->>Button: Clicks "Credify Post"
Content Script->>Background: Request analysis
Background->>Content Script: Return results
Content Script->>Modal: Display analysis
Modal->>User: Show credibility score & flags
MutationObserve/
βββ assets/
β βββ check.png # Icon asset
β βββ credify-icon.png # Extension icon
β βββ start-button.png # Button asset
βββ background.js # Background service worker
βββ contentScript.js # Main content injection logic
βββ credibilityModal.js # Modal UI component
βββ manifest.json # Extension configuration
βββ popup.html # Extension popup UI
βββ popup.js # Popup logic
βββ LICENSE # MIT License
βββ README.md # This file
- JavaScript (ES6+): Core programming language
- Chrome Extension API: Browser integration
chrome.storage: Local data persistencechrome.tabs: Tab managementchrome.runtime: Message passing
- MutationObserver API: DOM change detection
- Shadow DOM Handling: Reddit's modern web component architecture
- CSS3: Styling and animations
The extension is configured through manifest.json:
{
"name": "Credify",
"version": "0.1.0",
"manifest_version": 3,
"permissions": ["storage", "tabs", "activeTab"],
"host_permissions": ["https://*.reddit.com/*"]
}analyzePost(postId, subreddit, postTitle): Performs credibility analysisinjectButtonForPost(postId): Adds button to specific postfindPostElementById(postId): Locates post in DOMgetPostTitle(postId): Extracts post title using multiple strategiescreateCredibilityButton(postId): Creates styled button element
The extension includes helper functions accessible via the browser console:
window.inspectRedditDOM(): Analyzes Reddit's DOM structurewindow.cleanupDuplicateButtons(): Removes duplicate button instances
- Integrate with real credibility API/ML model
- Add user customization options (themes, sensitivity settings)
- Implement caching strategy for better performance
- Add support for other social media platforms
- Provide detailed source citations
- Include user reporting mechanism
- Add browser sync for settings across devices
- Implement rate limiting and API optimization
Currently tested and supported:
- β Google Chrome (Manifest V3)
- β Microsoft Edge (Chromium-based)
Planned support:
- π Firefox (requires Manifest V2 or V3 adaptation)
- π Safari (requires separate implementation)
Credify respects your privacy:
- No personal data collection
- Analysis performed locally (mock data currently)
- No external API calls in current version
- Chrome storage used only for caching analysis results
- No tracking or analytics
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Chrome Extension Manifest V3
- Designed for Reddit's modern web architecture
- Inspired by the need for better information verification tools
For questions, suggestions, or issues, please open an issue on GitHub.
Note: This extension currently uses mock data for demonstration purposes. Integration with a real credibility analysis API is planned for future releases.