A lightweight Firefox extension that removes sponsored posts, suggested content, and Reels from your Facebook feed, leaving only posts from friends and pages you follow.
- Remove Sponsored Content: Automatically detects and hides sponsored posts
- Filter Suggestions: Removes suggested posts from pages and people you don't follow
- Hide Reels: Filters out Reels and short video content
- Real-time Filtering: Uses MutationObserver to catch dynamically loaded content
- Performance Optimized: Uses localized microtask scans and pre-paint CSS guards
- Privacy Focused: All processing happens locally, no data collection
- Multi-language Support: Currently supports 8 languages
- English
- 繁體中文 (Traditional Chinese)
- 简体中文 (Simplified Chinese)
- 日本語 (Japanese)
- 한국어 (Korean)
- Français (French)
- Deutsch (German)
- Español (Spanish)
Install directly from Mozilla Add-ons: Facebook Feed Filter
- Clone this repository:
git clone git@github.com:Mowd/facebook-feed-filter.git
cd facebook-feed-filter- Open Firefox and navigate to
about:debugging - Click "This Firefox" in the left sidebar
- Click "Load Temporary Add-on"
- Select the
manifest.jsonfile from the cloned repository - The extension is now active! Visit Facebook to see it in action
- Download the latest
.xpifile from the Releases page - Drag and drop the
.xpifile into Firefox - Click "Add" when prompted
- Done! The extension is now installed permanently
- Once installed, navigate to Facebook
- The extension runs automatically - no configuration needed
- Filtered content will be replaced with a subtle placeholder
- Check the browser console for detailed filtering logs (optional)
The extension uses content scripts to:
- Monitor DOM changes using MutationObserver
- Identify sponsored/suggested content through text matching
- Find the complete feed unit or section container and hide it
- Display a placeholder showing what was filtered
facebook-feed-filter/
├── manifest.json # Extension configuration
├── content.js # Main content script
├── styles.css # Styling for placeholders
├── icons/ # Extension icons
├── _locales/ # Internationalization files
├── PRIVACY_POLICY.md # Privacy policy
└── README.md # This file
- Immediate Processing: Handles relevant DOM mutations in a microtask before the next paint
- Localized Scanning: Scans only affected feed units instead of the entire document
- WeakSet Tracking: Prevents reprocessing of already filtered elements
- CSS Guards: Hides high-confidence sponsored and Reel layouts while JavaScript resolves their full container
- Fallback Scanning: Uses a low-frequency full scan for Facebook updates that bypass normal mutation paths
Contributions are welcome! Here's how you can help:
- Check existing issues first
- Include browser version and console logs
- Provide steps to reproduce
- Create a new locale folder in
_locales/ - Copy
_locales/en/messages.jsonand translate - Update detection keywords in
content.js - Submit a pull request
# Clone the repository
git clone git@github.com:Mowd/facebook-feed-filter.git
cd facebook-feed-filter
# Make your changes
# Test in Firefox using temporary installation
# Package for distribution
./package.sh- Use clear, descriptive variable names
- Add comments for complex logic
- Test thoroughly before submitting PR
This extension:
- ✅ Processes all data locally in your browser
- ✅ Does NOT collect or transmit any personal data
- ✅ Does NOT use analytics or tracking
- ✅ Does NOT require any account or sign-in
See PRIVACY_POLICY.md for full details.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
- Reduced visible filtering delay with localized mutation processing from
document_start - Added pre-paint CSS guards for high-confidence sponsored posts and Reel layouts
- Updated Reel detection for Facebook's current singular
Reelregions and complete section removal - Fixed "People You May Know" cards leaving their header and outer shell behind
- Improved full feed-unit selection for sponsored posts and recommended public-group posts
- Improved Sponsored Post Detection: Added support for hidden sponsored labels referenced through
aria-labelledby - Added CTA-based fallback detection for ad layouts without readable sponsored text
- Improved ancestor container selection so the entire sponsored post is removed instead of only the inner ad card
- Fixed large sponsored image posts leaving the header and engagement bar behind
- Updated for Facebook's new recommendation system: Now detects and filters posts with Facebook's new recommendation markers
- Fixed language-specific recommendation text for Spanish and German
- Improved accuracy to prevent false positives
- Major Performance Breakthrough: Completely resolved lag issues when multiple recommendations appear
- Implemented batch processing for DOM operations - reduces reflows by 95%
- Added progressive hiding mechanism to prevent visual glitches
- Smart MutationObserver management prevents cascade reactions
- Uses requestAnimationFrame for optimal rendering timing
- Increased debounce time to 1000ms for better performance
- Fixed "screen tearing" issue when removing multiple posts simultaneously
- New Feature: Shows simple placeholder text where posts were removed
- Placeholder text supports all 8 languages with appropriate translations
- Minimal design - just gray text without borders or backgrounds
- Different messages for recommendations, Reels, and sponsored content
- Critical Performance Fix: Resolved severe performance issues causing page lag
- Fixed: More precise filtering - now only removes posts with "Follow" or "Join" buttons
- Optimized DOM queries - reduced element scanning by 90%
- Changed from scanning all span elements to only button elements
- Enhanced debounce mechanism to prevent duplicate executions
- Increased scan interval from 5s to 10s to reduce CPU usage
- Improved detection logic for Reels and recommendation buttons
- Initial release
- Support for filtering sponsored posts
- Support for filtering suggested content
- Support for filtering Reels
- Multi-language support (8 languages)
- Visual feedback with counters
- Thanks to all contributors and testers
- Inspired by the need for a cleaner Facebook experience
- Built with privacy and performance in mind
- Issues: GitHub Issues
- Discussions: GitHub Discussions
If you find this project helpful, consider buying me a coffee!
- Chrome/Edge version
- Customizable filtering rules
- Whitelist/blacklist functionality
- Statistics dashboard
- Export/import settings
- More granular content filtering options
This extension is not affiliated with, endorsed by, or sponsored by Facebook/Meta. It's an independent tool created to improve user experience.
If you find this extension helpful, please consider:
- ⭐ Starring this repository
- 🐛 Reporting bugs and suggestions
- 🌍 Contributing translations
- 📢 Sharing with friends who might benefit
