Note: This extension was entirely vibe-coded with a focus on clean architecture and functionality over formality.
A browser extension that helps you maintain focus by hiding distracting sections on social media platforms and providing smart redirects to more meaningful content. Currently supports Chromium-based browsers (Chrome, Edge, Brave) with plans to expand to Firefox and Safari.
- Element Hiding: Hide distracting sections using precision XPath selectors
- Intelligent Redirects: Automatically redirect to focused content (e.g., YouTube subscriptions instead of homepage)
- Auto-Click Actions: Automatically click elements after hiding (e.g., switch to "Following" tab on Twitter)
- Multi-Platform Support: Twitter/X, LinkedIn, YouTube, Reddit with dynamic platform detection
- Persistent Settings: User preferences saved across browser sessions
- Clean Architecture: Maintainable, testable, and extensible codebase
- Performance Optimized: Debounced DOM operations and smart mutation observers
Currently Supported:
- Chrome
- Microsoft Edge
- Brave Browser
- Other Chromium-based browsers
Coming Soon:
- Firefox (WebExtensions compatibility layer in development)
- Safari (planned for future release)
- Clone or download this repository
- Build the extension:
npm run build
- Open Chrome and navigate to
chrome://extensions/
- Enable "Developer mode" (toggle in top right)
- Click "Load unpacked" and select the project directory
- The extension is now active with default settings
- Follow steps 1-2 from Chrome installation
- Open Edge and navigate to
edge://extensions/
- Enable "Developer mode" (toggle in left sidebar)
- Click "Load unpacked" and select the project directory
- The extension is now active with default settings
- Follow steps 1-2 from Chrome installation
- Open Brave and navigate to
brave://extensions/
- Enable "Developer mode" (toggle in top right)
- Click "Load unpacked" and select the project directory
- The extension is now active with default settings
# Development mode (modular, with live reload indicator)
npm run dev
# Production build (bundled, optimized)
npm run prod
# Clean and rebuild
npm run rebuild
# Package for distribution
npm run package:chrome
npm run package:firefox
npm run package:all
The extension uses a declarative config.json
file for all platform configurations:
{
"sections": [
{
"id": "twitter_foryoupage",
"name": "X: For You Page",
"platform": "twitter",
"xpaths": ["//div[@role='presentation']//span[text()='For you']/parent::div"],
"toClick": "//div[@role='presentation']//span[text()='Following']/parent::div"
},
{
"id": "youtube_redirect",
"name": "YouTube - Home to Feed Redirect",
"platform": "youtube",
"currentPath": "/",
"newPath": "/feed/subscriptions"
}
]
}
Property | Type | Description |
---|---|---|
id |
string | Unique identifier for the section |
name |
string | Display name in popup interface |
platform |
string | Platform identifier (twitter, linkedin, youtube, reddit) |
xpaths |
array | XPath selectors for elements to hide |
currentPath |
string | URL path to redirect from |
newPath |
string | URL path to redirect to |
toClick |
string | Optional XPath for element to click after hiding |
The project uses a sophisticated build system supporting both development and production modes:
npm run dev
- Uses ES modules for easier debugging
- Includes DEV mode indicator in popup
- Live reload friendly
- Uses
popup-template.html
→popup.html
npm run prod
- Bundles modules into single files for compatibility
- Removes dev indicators for clean UI
- Optimizes for distribution
- Creates
content-bundled.js
andpopup-bundled.js
Command | Purpose | Output |
---|---|---|
npm run dev |
Development setup | Modular files, dev indicators |
npm run build |
Production build | Bundled files, optimized |
npm run clean |
Reset to dev mode | Removes bundled files |
npm run rebuild |
Clean + build | Fresh production build |
npm run package:chrome |
Chrome package | ZIP file for Chrome store |
npm run package:firefox |
Firefox package | ZIP file for Firefox store |
npm run lint |
Code linting | ESLint check |
npm run format |
Code formatting | Prettier formatting |
Simply add to config.json
:
{
"id": "newplatform_section",
"name": "New Platform: Section Name",
"platform": "newplatform",
"xpaths": ["//xpath/selector"]
}
Add new functionality by:
- Creating entities in
src/domain/entities/
- Adding services to
src/domain/services/
- Implementing use cases in
src/application/usecases/
- Adding infrastructure in
src/infrastructure/
- Updating presentation controllers in
src/presentation/
The project maintains high code quality through:
- ESLint configuration for consistent code style
- Prettier for automatic code formatting
- Clean Architecture principles
- Comprehensive documentation
- Type safety through JSDoc comments
We welcome contributions! Please help us improve PureFeed.
- Fork the repository
- Create a feature branch (
git checkout -b feature/feature-name
) - Follow the clean architecture patterns
- Add tests for new functionality
- Run quality checks (
npm run lint && npm run format
) - Commit changes (
git commit -m 'Add amazing feature'
) - Push to branch (
git push origin feature/feature-name
) - Open a Pull Request
We have several issue templates to help you report problems or request features:
- Bug Report - Report bugs with detailed reproduction steps
- Feature Request - Propose new features or enhancements
- Platform Support Request - Request support for new social media platforms
- Question/Support - Get help or ask questions
To add support for a new social media platform:
- Add configuration to
config.json
- Test on the target platform
- Document the new platform
- Submit PR with testing evidence
No code changes are required - the extension automatically detects and supports new platforms from configuration!
npm run package:chrome
# Upload purefeed-extension-chrome.zip to Chrome Web Store
npm run package:firefox
# Upload purefeed-extension-firefox.zip to Firefox Add-ons
npm run build
# Load unpacked extension from project directory
- Debounced DOM operations to prevent excessive processing
- Smart mutation observers that only trigger when needed
- Platform detection to avoid unnecessary processing on unsupported sites
- Lazy loading of extension components
- Minimal permissions required
- No external network requests
- Local storage only for settings
- Content Security Policy compliant
- Node.js: >= 14.0.0 (for build scripts)
- Chrome: Version 88+ (for ES modules support)
- Edge: Version 88+ (Chromium-based)
- Brave: Latest version
This project is licensed under the MIT License - see the LICENSE file for details.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Star this repo if it helps you stay focused!