This is a web extension for all major browsers whose purpose is to hide unpleasant or unwanted content on social media platforms and other websites.
- Old Reddit: hides content on /r/all by default, option to enable hiding on any subreddit. Provides filtering by keyword and subreddit.
- Youtube: hides content on any page with video thumbnails, hide Youtube's dismissable segments that breakup pages since Youtube ignores/resets the user's desire to close them on a weekly basis. Filtering based on video titles. Also filters comment sections under videos.
- X (Twitter): Filters sidebar content based on keywords
- Tiktok
- News sites
- New reddit
- Hacker news
- Imgur maybe
- Add UI in extension popup to add keywords, add categories, assign keywords to categories, dev-only button to save to sqlite, on-off toggle
- Update code so that toggling off extension shows all previously hidden content. Ensure toggling on re-hides without page reload.
- Add filtering for usernames on platform-specific basis; Add tagging for username filtering (so that sharing filtering lists on shared preferences can work)
- Add UI for adding usernames, extension to detect which website you're on to auto-associate it the platform.
- Move entities to shared folder
- Add .env and .env.example - needed for github API access for updating gists
- Finish assigning categories to default JSON subreddits
- Make sure IS_DEV_MODE type checking is properly false when built and instsalled
- Update keyword filtering from gists (stored as JSON)
- Update keyword filtering from JSON (if dev mode/JSON is available, otherwise use API call to gist)
- Write tool to dump SQL to JSON file if going with approach to store JSON on a gist for continual updates
- Dev script to update gist JSON via API from local sqlite store
- Add toggle for filtering while viewing specific subreddit or only on /r/all
- Ensure filtering works for "cross-posts", in that the filtering is also applied to the origin subreddit and origin title
- Fix Youtube commenting filtering - it removes entire tree parent comment tree when a single child comment hits a filter
- X/Twitter: add filtering for any crypto stuff
- Remove "members only" youtube videos
- I am using sqlite for development purposes because managing default data that ships with the extension is easier here than the WebExtensions Storage API. The extension will load sqlite database data to the WebExtensions Storage API when installed and then operate from there.
- React18
- TypeScript
- Tailwindcss
- Vite
- Turborepo
- Prettier
- ESLint
- Chrome Extension Manifest Version 3
- Custom HMR(Hot Module Rebuild) Plugin
- Clone repository
- Change
extensionDescription
andextensionName
inmessages.json
file - Install pnpm globally:
npm install -g pnpm
(check your node version >= 18.12.0) - Run
pnpm install
- Run
pnpm run setup-db
to create the local sqlite database if needing to do updates to default data. Include the--delete
flag if you want it to wipe the current database before running again (if there are structural changes etc).
- Run:
- Dev:
pnpm dev
- When you run with Windows, you should run as administrator. (Issue#456)
- Prod:
pnpm build
- Dev:
- Open in browser -
chrome://extensions
- Check -
Developer mode
- Find and Click -
Load unpacked extension
- Select -
dist
folder at root
- Run:
- Dev:
pnpm dev:firefox
- Prod:
pnpm build:firefox
- Dev:
- Open in browser -
about:debugging#/runtime/this-firefox
- Find and Click -
Load Temporary Add-on...
- Select -
manifest.json
fromdist
folder at root
Note: Firefox plugins are added in temporary mode and are removed after closing the browser and must be added again when re-opened.
Main app with background script, manifest
manifest.js
- manifest for chrome extensionlib/background
- background script for chrome extension (background.service_worker
in manifest.json)public/content.css
- content css for user's page injection
Some shared packages
dev-utils
- utils for chrome extension development (manifest-parser, logger)hmr
- custom HMR plugin for vite, injection script for reload/refresh, hmr dev-servershared
- shared code for entire project. (types, constants, custom hooks, components, etc.)storage
- helpers for storage easier integration with, e.g local, session storagestailwind-config
- shared tailwind config for entire projecttsconfig
- shared tsconfig for entire projectui
- here's a function to merge your tailwind config with global one, and you can save components herevite-config
- shared vite config for entire projectzipper
- Bypnpm zip
you can packdist
folder intoextension.zip
inside newly createddist-zip
content
- content script for chrome extension (content_scripts
in manifest.json)content-ui
- content script for render UI in user's page (content_scripts
in manifest.json)content-runtime
- content runtime script this can be inject frompopup
like standardcontent
devtools
- devtools for chrome extension (devtools_page
in manifest.json)devtools-panel
- devtools panel for devtoolsnew-tab
- new tab for chrome extension (chrome_url_overrides.newtab
in manifest.json)options
- options for chrome extension (options_page
in manifest.json)popup
- popup for chrome extension (action.default_popup
in manifest.json)side-panel
- sidepanel(Chrome 114+) for chrome extension (side_panel.default_path
in manifest.json)
This project filters content based on an extensive list of keywords. This list of keywords and their assortment into categories is not a condemenation of any particular keyword or topic related to that keyword, and especially so in that much of the categorization was done automatically with an LLM. It is my hope that no one reads into the inclusion of any keywords or the categorization of a keyword. The process of filtering based on sometimes sensitive words is a delicate situation and it is not my intention to offend or exclude any important topics or groups of people from general discourse and freedoms of speech. This project may also contain keywords and categories from outside sources, and these sources may not be very thoroughly reviewed before inclusion. Viewing the list of filtered keywords contains language not safe for work.
This extension is built from a web extension boilerplate with credit and thanks to them for excellent work!