MoodScope is an industry-standard Chrome extension that provides real-time sentiment analysis across major social media platforms with advanced analytics, customizable notifications, and comprehensive data management.
- Real-time Sentiment Analysis: Advanced sentiment detection across 6 major social platforms
- Multi-Platform Integration: Twitter/X, Facebook, Instagram, LinkedIn, Reddit, YouTube
- Professional Dashboard: 4-tab interface with comprehensive analytics
- Advanced Analytics: Historical data, trend analysis, and platform-specific statistics
- Data Export System: JSON export for analytics, history, and complete backups
- Theme System: Dark/Light mode with persistent preferences
- Notification System: Smart alerts with keyword monitoring and sentiment thresholds
- Auto-Analysis Mode - Background processing with 30-second intervals
- Keyword Tracking - Custom keyword monitoring and alerts
- Settings Management - Comprehensive configuration options
- History Management - Analysis history with timestamps and metadata
- Data Persistence - LocalStorage with automatic sync
- Notification System - Smart alerts with customizable thresholds
- Advanced Statistics - Weekly averages, positivity metrics, site-specific data
- Real Site Detection - Chrome tabs API integration
- Performance Optimization - Efficient memory usage and background processing
moodscope/
├── manifest.json # Extension configuration and permissions
├── popup.html # Main UI interface (420x600px)
├── js/
│ ├── popup.js # Main application logic (MoodScopePro class)
│ ├── background.js # Service worker for background processing
│ ├── sentiment-engine.js # Core sentiment analysis algorithms
│ ├── notification-system.js # Alert and notification management
│ ├── chart-utils.js # Data visualization utilities
│ ├── filter-system.js # Content filtering and processing
│ ├── settings-manager.js # User preferences and configuration
│ ├── theme-manager.js # UI theme management
│ └── content-scripts/ # Platform-specific integrations
│ ├── twitter.js # Twitter/X sentiment analysis
│ ├── facebook.js # Facebook content processing
│ ├── instagram.js # Instagram integration
│ ├── linkedin.js # LinkedIn professional content
│ ├── reddit.js # Reddit community analysis
│ └── youtube.js # YouTube comment sentiment
├── css/
│ ├── popup.css # Main UI styles (739 lines)
│ └── content.css # Injected styles for content scripts (591 lines)
└── icons/ # Extension icons (16, 32, 48, 128px)
class SentimentEngine {
constructor() {
this.lexicon = {
positive: [...], // 40+ positive sentiment words
negative: [...], // 45+ negative sentiment words
neutral: [...] // 20+ neutral sentiment words
};
this.intensifiers = {}; // Sentiment amplifiers
this.negators = []; // Sentiment negation detection
}
}- Lexicon-based sentiment scoring
- Context-aware intensity detection
- Negation handling and phrase analysis
- Custom keyword integration
- Confidence scoring (0-100)
- Local Storage: Real-time analysis data, user preferences
- Chrome Storage Sync: Cross-device settings synchronization
- Session Storage: Temporary analysis state
// Analysis Entry
{
id: timestamp,
timestamp: Date,
sentiment: { score: number, label: string, color: string },
site: string,
keywords: string[]
}
// Statistics Object
{
today: number,
weekAvg: number,
positivePercent: number,
siteStats: { facebook: 0, twitter: 0, instagram: 0, reddit: 0 }
}- Chrome Browser (v88+)
- Node.js (optional, for development tools)
- Git
# Clone repository
git clone https://github.com/username/moodscope.git
cd moodscope
# Load extension in Chrome
1. Open Chrome Extensions (chrome://extensions/)
2. Enable "Developer mode"
3. Click "Load unpacked"
4. Select the moodscope directory# Make changes to source files
# Reload extension in Chrome
chrome://extensions/ → Click "Reload" button
# Test on supported platforms
# Navigate to Twitter, Facebook, Instagram, LinkedIn, Reddit, YouTube
# Open extension popup to verify functionality| Platform | Status | Content Scripts | Features |
|---|---|---|---|
| Twitter/X | âś… Full | twitter.js |
Timeline, tweets, replies |
| âś… Full | facebook.js |
Posts, comments, news feed | |
| âś… Full | instagram.js |
Posts, stories, comments | |
| âś… Full | linkedin.js |
Professional posts, articles | |
| âś… Full | reddit.js |
Posts, comments, threads | |
| YouTube | âś… Full | youtube.js |
Video comments, descriptions |
Each platform implements:
- DOM Monitoring: MutationObserver for dynamic content
- Element Detection: Platform-specific selectors
- Sentiment Processing: Text extraction and analysis
- UI Integration: Non-intrusive sentiment indicators
- Performance Optimization: Debounced processing and memory management
- Daily Analysis Count: Today's sentiment analyses
- Weekly Average: 7-day sentiment trend
- Positivity Percentage: Ratio of positive vs negative sentiment
- Platform Distribution: Per-site analysis statistics
- Historical Trends: Time-series sentiment data
- Analytics Export: Statistics and metadata (JSON)
- History Export: Complete analysis history (JSON)
- Full Backup: All user data and settings (JSON)
{
"stats": {
"today": 15,
"weekAvg": 73,
"positivePercent": 68,
"siteStats": {
"twitter": 8,
"facebook": 4,
"reddit": 3
}
},
"exportDate": "2025-09-25T10:30:00.000Z",
"totalAnalyses": 127
}notifications: {
enabled: boolean,
criticalOnly: boolean,
keywordAlerts: boolean
}- Service Worker: Efficient background task management
- Debounced Analysis: Prevents excessive API calls
- Memory Management: Automatic cleanup of processed content
- Storage Optimization: Compressed data structures
- Intersection Observer: Lazy-load analysis for visible content
- Mutation Observer: Efficient DOM change detection
- Set-based Deduplication: Prevents duplicate processing
- Throttled Execution: Rate-limited analysis to prevent performance issues
- Local Storage Only: No external data transmission
- User Consent: Explicit permission for all features
- Minimal Permissions: Only required Chrome APIs
- Content Isolation: Sandboxed content script execution
{
"permissions": [
"activeTab",
"storage",
"notifications",
"scripting",
"tabs"
]
}- Extension loads without errors
- All 15+ features function correctly
- Material Icons display properly
- Theme switching works
- Data export generates valid JSON
- Settings persist across sessions
- Content scripts work on all platforms
- Performance remains smooth during analysis
- Chrome 88+ (Manifest V3 support)
- Edge 88+ (Chromium-based)
- Other Chromium browsers
{
"manifest_version": 3,
"name": "MoodScope",
"version": "1.0.0",
"permissions": ["activeTab", "storage", "notifications", "scripting", "tabs"],
"host_permissions": ["https://twitter.com/*", "https://facebook.com/*", ...],
"content_scripts": [...],
"action": { "default_popup": "popup.html" },
"background": { "service_worker": "js/background.js" }
}chrome.storage.local- Local data persistencechrome.storage.sync- Cross-device settings syncchrome.tabs- Real site detection and tab managementchrome.notifications- System notification displaychrome.runtime- Message passing between components
MoodScopePro.analyzePage()- Trigger sentiment analysisSentimentEngine.analyzeSentiment(text)- Core analysis functionNotificationSystem.showAlert(type, message)- Display notifications
- Machine learning sentiment model integration
- Real-time sentiment trend visualization
- Multi-language sentiment support
- Advanced keyword pattern matching
- Sentiment comparison across platforms
- Data visualization dashboard
- Custom notification webhooks
- Sentiment history export to CSV
- WebAssembly sentiment engine
- IndexedDB for large datasets
- Background sync optimization
- Reduced memory footprint
MoodScope represents a production-ready Chrome extension with enterprise-level features, comprehensive social media integration, and professional UI/UX design. The codebase demonstrates advanced Chrome extension development techniques, efficient data management, and scalable architecture suitable for commercial deployment.


.png)
.png)
.png)


