A browser extension that removes sponsored listings and advertisements from websites using configurable CSS selectors, text matching, and attribute detection.
Actually, Relistr can be used in tandum with other ad blocker extensions! Relistr exists to serve as an open-source way to programmatically remove listings and sponsored elements from webpages. Typical ad blockers may not work on hard embedded elements or on unsupported sites. With Relistr, you can add your own custom element removal rulesets, so that you can remove sponsored content/listings on typically unsupported pages! You can also share your rulesets with others, and/or contribute them to the global Relistr rulesets. See Contributing Guide
- Smart Detection: Multiple detection methods including CSS selectors, text matching, and HTML attributes
- Built-in Rules: Pre-configured rules for popular websites (Amazon, Google, Reddit, etc.)
- Custom Rules: Upload your own JSON configuration for any website
- Flexible Configuration: Toggle global selectors and domain-specific rules
- Statistics: Track how many sponsored items have been removed
- Privacy-Focused: All processing happens locally, no data collection
- Visit the Chrome Web Store page
- Click "Add to Chrome"
- Confirm the installation
-
Clone this repository:
git clone https://github.com/JosephAmbayec/Relistr.git cd Relistr -
Install dependencies:
npm install
-
Build the extension:
npm run build
-
Load in Chrome:
- Open Chrome and go to
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked" and select the project folder
- Open Chrome and go to
- Click the Relistr icon in your browser toolbar
- Toggle "Extension Enabled" to turn on/off
- Toggle "Use Global Selectors" to control global ad blocking rules
- Click "Advanced Options" in the popup
- Upload a JSON file with custom rules for specific domains
- Use the built-in editor to preview and import rules
{
"domains": {
"example.com": {
"selectors": [
".sponsored",
"[data-ad='true']"
],
"textMatches": [
"Sponsored",
"Advertisement"
],
"attributes": [
{
"name": "data-testid",
"value": "sponsored-result"
}
]
}
}
}Relistr comes with built-in rules for a variety of domains, please consider Contributing with your field-tested custom rulesets!
- CSS Selectors: Target elements by class, ID, or attribute selectors
- Text Matching: Find elements containing specific text (e.g., "Sponsored")
- Attribute Detection: Match elements with specific HTML attributes
- Global Selectors: Universal rules that work across all websites
- Domain-Specific Rules: Targeted rules for specific websites
- Custom Rules: User-uploaded JSON configurations
- Statistics Tracking: Monitor removal counts
- Node.js 16+
- npm or yarn
- TypeScript knowledge
# Clone the repository
git clone https://github.com/JosephAmbayec/Relistr.git
cd Relistr
# Install dependencies
npm install
# Start development build
npm run watch
# Build for production
npm run build
# Clean build artifacts
npm run cleanRelistr/
├── src/ # TypeScript source files
│ ├── content.ts # Content script (main blocking logic)
│ ├── background.ts # Service worker
│ ├── popup.ts # Extension popup
│ ├── options.ts # Options page
│ └── types.ts # Type definitions
├── dist/ # Compiled JavaScript (generated)
├── manifest.json # Extension manifest
├── popup.html # Popup UI
├── options.html # Options page UI
├── config.json # Built-in blocking rules
├── CHANGELOG.md # Complete changelog
├── CONTRIBUTING.md # Contribution Guide
├── config.json # Built-in blocking rules
└── test-custom-selectors.json # Example custom rules
To add support for a new website:
- Identify the sponsored content elements on the target website
- Add Custom Selector Rules in the Options menu via JSON or forms.
"newsite.com": { "selectors": [".sponsored-item"], "textMatches": ["Sponsored"], "attributes": [{"name": "data-ad", "value": "true"}] }
- Test the rules on the website
- Export your custom ruleset json
- Submit a pull request with the json
- No Data Collection: Relistr processes everything locally
- No Network Requests: Extension operates entirely offline
- Content Security Policy: Strict CSP prevents code injection
- Minimal Permissions: Only requests necessary browser permissions
This project is licensed under the MIT License - see the LICENSE file for details.
See CHANGELOG.md for version history and updates.
- Bug Reports: GitHub Issues
- Feature Requests: GitHub Discussions
- Documentation: Check the Wiki
- Built with TypeScript and modern web extension APIs
- Inspired by the need for cleaner, ad-free browsing experiences
- Thanks to all contributors and users providing feedback
Made with 💓 by Joseph Ambayec
Disclaimer: This extension is for educational and personal use. Please respect website terms of service and consider supporting content creators through legitimate means.
README autogenerated by generative AI.
