Skip to content

Mowd/facebook-feed-filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Facebook Feed Filter

License: GPL v3 Firefox Add-on Version Maintenance

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.

๐ŸŒŸ Features

  • 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

๐ŸŒ Supported Languages

  • English
  • ็น้ซ”ไธญๆ–‡ (Traditional Chinese)
  • ็ฎ€ไฝ“ไธญๆ–‡ (Simplified Chinese)
  • ๆ—ฅๆœฌ่ชž (Japanese)
  • ํ•œ๊ตญ์–ด (Korean)
  • Franรงais (French)
  • Deutsch (German)
  • Espaรฑol (Spanish)

๐Ÿ“ฆ Installation

Option 1: Firefox Add-ons Store (Recommended)

Install directly from Mozilla Add-ons: Facebook Feed Filter

Option 2: Manual Installation (Development)

  1. Clone this repository:
git clone git@github.com:Mowd/facebook-feed-filter.git
cd facebook-feed-filter
  1. Open Firefox and navigate to about:debugging
  2. Click "This Firefox" in the left sidebar
  3. Click "Load Temporary Add-on"
  4. Select the manifest.json file from the cloned repository
  5. The extension is now active! Visit Facebook to see it in action

Option 3: Install from Release

  1. Download the latest .xpi file from the Releases page
  2. Drag and drop the .xpi file into Firefox
  3. Click "Add" when prompted
  4. Done! The extension is now installed permanently

๐Ÿš€ Usage

  1. Once installed, navigate to Facebook
  2. The extension runs automatically - no configuration needed
  3. Filtered content will be replaced with a subtle placeholder
  4. Check the browser console for detailed filtering logs (optional)

๐Ÿ› ๏ธ Technical Details

How It Works

The extension uses content scripts to:

  1. Monitor DOM changes using MutationObserver
  2. Identify sponsored/suggested content through text matching
  3. Find the parent article container and hide it
  4. Display a placeholder showing what was filtered

File Structure

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

Performance Optimizations

  • 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

๐Ÿค Contributing

Contributions are welcome! Here's how you can help:

Reporting Issues

  • Check existing issues first
  • Include browser version and console logs
  • Provide steps to reproduce

Adding Language Support

  1. Create a new locale folder in _locales/
  2. Copy _locales/en/messages.json and translate
  3. Update detection keywords in content.js
  4. Submit a pull request

Development Setup

# 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

Code Style

  • Use clear, descriptive variable names
  • Add comments for complex logic
  • Test thoroughly before submitting PR

๐Ÿ“œ Privacy Policy

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.

๐Ÿ“„ License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.

๐Ÿ”„ Changelog

Version 1.0.4

  • 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

Version 1.0.3

  • 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

Version 1.0.2

  • 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

Version 1.0.1

  • 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

Version 1.0.0

  • 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

๐Ÿ™ Acknowledgments

  • Thanks to all contributors and testers
  • Inspired by the need for a cleaner Facebook experience
  • Built with privacy and performance in mind

๐Ÿ’ฌ Support

โ˜• Buy Me a Coffee

If you find this project helpful, consider buying me a coffee!

Buy Me A Coffee

๐Ÿšง Roadmap

  • Chrome/Edge version
  • Customizable filtering rules
  • Whitelist/blacklist functionality
  • Statistics dashboard
  • Export/import settings
  • More granular content filtering options

โš ๏ธ Disclaimer

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

About

Remove sponsored posts and recommendations from Facebook

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors