Facebook Comment Sorter - Changelog
Version 2.1 (2025-01-06) - Reply Expansion Update 🚀
✨ New Features
Automatic Comment Reply Expansion
- Smart Reply Detection: Automatically finds and expands reply buttons with multi-language support
- Detects patterns like "View X replies", "X balasan", "Show more replies"
- Supports numeric patterns in 12+ languages
- Excludes hide/collapse buttons and "load more comments" buttons
- Viewport-Aware Processing: Only expands replies that are visible on screen (configurable)
- Scroll Position Preservation: Maintains your reading position when replies expand
- Performance Optimized:
- Processes one reply button at a time to avoid overwhelming the page
- Debounced scroll handling for smooth performance
- Configurable delays between expansions
Enhanced Configuration System
const CONFIG = {
sortPreference: "all", // "newest" or "all"
debug: true, // Console logging
expandReplies: true, // Auto-expand replies
replyExpandDelay: 1000, // Delay between expansions (ms)
viewportOnly: true // Only expand visible replies
};
🔧 Improvements
- Better Performance: Added debouncing for scroll events and mutation observers
- Memory Management: Properly clears processed reply buttons on page navigation
- Enhanced Debugging: Added specific logs for reply expansion activities
- Code Organization: Separated reply expansion logic into dedicated functions
📝 Technical Details
- Reply Button Detection: Uses advanced text pattern matching for multiple languages
- Scroll Handling: Implements passive event listeners for better performance
- State Management: Uses WeakSet for processed buttons to prevent memory leaks
🌍 Reply Expansion Language Support
Detects reply buttons in:
- English: "replies", "view replies", "X more replies"
- Indonesian: "balasan", "lihat balasan", "X balasan lagi"
- Spanish: "respuestas"
- French: "réponses"
- German: "antworten"
- Italian: "risposte"
- Dutch: "antwoorden"
- Russian: "ответов"
- Chinese: "回复"
- Japanese: "返信"
- Arabic: "ردود"
- Hindi: "उत्तर"