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: Implements debouncing to minimize impact on browsing speed
- 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 parent article 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
- Debouncing: Processes changes in batches every 500ms
- WeakSet Tracking: Prevents reprocessing of already filtered elements
- Selective Scanning: Only processes new elements added to the DOM
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.
- 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
