DO NOT work on the code from GreasyFork. It is built code. Work on this repository instead.
- Bun ^1.0
BiomeIDE Extension - For code formatting
git clone https://github.com/webdevsk/FB-Mobile-Clean-my-feeds.git
cd FB-Mobile-Clean-my-feedsbun install# Without hosted local server
bun run build:watch
# With hosted local server
bun devbun run build:greasyfork- dist - Built files (Output)
- src - Source files
- config.ts - Global config like devMode, runScriptOn, node selectors, theme configuration, etc
- index.ts - Entry point. Code starts here
- data - Data files
- filters-database.ts - Filter database. This is where you can add new categories, as well as the entries for settings menu
- keywords-per-language.ts - Keywords per language. This is where you can add new keywords for each language (Language detection is still unstable)
- lib - Library files
- menu-buttons-injector.ts - Settings Menu and Recent Feeds button
- settings-menu-injector.ts - Settings Page/Overlay and event listeners
- run-feeds-cleaner.ts - Mutation Observer that observes and scans posts for unwanted posts
- purge-element.ts - Function that handles removal of unwanted posts
- whitelisted-filters-storage.ts - Whitelisted filters handler
- on-ready-for-scripting.ts - The brain of this project. Handles WHEN to inject the nodes, observers and remove them based on page navigation, url match etc.
- Turn on
devModein config.ts to get verbose console logs. - You can write in pure JavaScript. Just create a new
.jsfile in src/lib and import it in src/index.ts - Try to follow "Inject when necessary, remove when not" principle. Just write your code in your own way and tell WindSurf, Cursor or VScode to handle it for you based on other functions here.
- Document your code
For any questions, please open an issue.