A high-performance ad blocker compatible with Mozilla Firefox and Chromium browsers.
- 99% compatibility with Easylist and uBlock Origin filters
- Blocks ads, trackers, and unwanted content
- Automatically updated filters
- High-performance mode for better performance
- Real-time block counter
- Data saved (KB, MB, GB)
- Time saved on page loads
- Statistics by type (ads, trackers, social networks)
- Performance metrics (memory, CPU)
- Minimal memory consumption (< 50MB typically)
- Batching to reduce CPU load
- Smart caching for better performance
- Automatic cleanup of unused resources
- Intuitive popup with statistics in real time
- Options page with advanced settings
- Custom lists (white/black)
- Statistics export
- Clone the repository:
git clone https://github.com/goastian/astian-privacy-protect/
cd astian-privacy-protect- Install dependencies:
npm install- Compile the extension:
# For Firefox
npm run build:firefox
# For Chromium
npm run build:chromium
# For both
npm run build:all- Download the
.xpifile from the releases - Open Firefox and go to
about:addons - Click the gear icon and select "Install add-on from file"
- Select the downloaded
.xpifile
- Download the
.zipfile from the releases - Extract the file to a folder
- Open Chrome and go to
chrome://extensions/ - Enable "Developer Mode"
- Click "Upload unpackaged extension"
- Select the extracted folder
src/
βββ background.ts # Main service worker
ββββ content.ts # Content script for web pages
ββββ popup.ts # Popup script
ββββ options.ts # Options page script
βββ adblocker.ts # Main adblocker logic
βββ stats-manager.ts # Statistics management
βββ performance-optimizer.ts # Performance optimizations
βββ types.ts # TypeScript type definitions
βββ manifest.json # Chromium (v3) manifest
βββ manifest-firefox.json # Firefox (v2) manifest
βββ popup.html # Popup interface
βββ options.html # Options page
βββ styles/ # CSS files
β βββ popup.css
β βββ options.css
βββ icons/ # Extension icons
βββ icon-16.png
βββ icon-32.png
βββ icon-48.png
βββ icon-128.png
# Development
npm run dev # Development mode with watch
npm run build # Build for production
npm run build:firefox # Build for Firefox only
npm run build:chromium # Build for Chromium only
npm run build:all # Build for both browsers
# Code Quality
npm run lint # Run ESLint
npm run test # Run tests
# Packaging
npm run package:firefox # Create .xpi for Firefox
npm run package:chromium # Create .zip for Chromium- Blocker Status: Enable/Disable
- High Performance Mode: Performance optimizations
- Blocking Types: Ads, trackers, social networks
- Refresh Interval: Filter update frequency
- Memory Limit: Memory usage control
- Custom Lists: Custom whitelists and blacklists
// Configuration Example
const config = {
enabled: true,
blockAds: true,
blockTrackers: true,
blockSocial: false,
whitelist: ['example.com'],
blacklist: ['ads.example.com'],
updateInterval: 24, // hours
showStats: true,
performanceMode: true
};- Total Blocked: Total number of blocked requests
- Data Saved: Amount of data saved (B, KB, MB, GB)
- Time Saved: Total time saved on page loads
- Blocked by Type: Breakdown by ads, trackers, etc.
- Performance: Memory and CPU usage
- Daily Statistics: Metrics for the current day
Statistics can be exported in JSON format for further analysis:
{
"stats": {
"totalBlocked": 1250,
"totalDataSaved": "15.2 MB",
"totalTimeSaved": "2.5m 30s",
"blockedByType": {
"ads"