Convert Figma logo to code with AI

EFForg logoprivacybadger

Privacy Badger is a browser extension that automatically learns to block invisible trackers.

3,136
380
3,136
142

Top Related Projects

45,801

uBlock Origin - An efficient blocker for Chromium and Firefox. Fast and lean.

Ghostery Browser Extension for Firefox, Chrome, Opera, Edge and Safari

DuckDuckGo Privacy Essentials browser extension for Firefox, Chrome.

Brave browser for Android, iOS, Linux, macOS, Windows.

Firefox Multi-Account Containers lets you keep parts of your online life separated into color-coded tabs that preserve your privacy. Cookies are separated by container, allowing you to use the web with multiple identities or accounts simultaneously.

AdGuard browser extension

Quick Overview

Privacy Badger is a browser extension developed by the Electronic Frontier Foundation (EFF) that automatically learns to block invisible trackers. It's designed to protect users' privacy by preventing advertisers and other third-party trackers from secretly tracking their browsing activity across websites.

Pros

  • Automatically learns to block trackers without relying on predefined lists
  • Open-source and maintained by a reputable organization (EFF)
  • Does not interfere with or block ads that respect user privacy
  • Provides a user-friendly interface to manage tracking domains

Cons

  • May occasionally break website functionality due to overzealous blocking
  • Limited customization options compared to some other privacy-focused extensions
  • Can be resource-intensive on older or less powerful devices
  • Effectiveness may vary depending on user browsing habits and websites visited

Code Examples

As Privacy Badger is a browser extension and not a code library, there are no code examples to provide.

Getting Started

Since Privacy Badger is a browser extension, there's no code-based quick start. However, users can easily install it by following these steps:

  1. Visit the official Privacy Badger website: https://privacybadger.org/
  2. Click on the "Install Privacy Badger" button for your browser
  3. Follow the browser's prompts to add the extension
  4. Once installed, Privacy Badger will start working automatically
  5. Users can click on the Privacy Badger icon in their browser to view and manage blocked trackers

Competitor Comparisons

45,801

uBlock Origin - An efficient blocker for Chromium and Firefox. Fast and lean.

Pros of uBlock

  • More comprehensive blocking capabilities, including network filters and cosmetic filtering
  • Highly customizable with advanced user settings and dynamic filtering
  • Lower CPU and memory usage, resulting in better performance

Cons of uBlock

  • Steeper learning curve for non-technical users
  • Requires more manual configuration to achieve optimal results
  • May break some websites if not properly configured

Code Comparison

Privacy Badger:

BadgerStorage.prototype = {
  getItem: function(key) {
    return this._storage.getItem(key);
  },
  setItem: function(key, value) {
    return this._storage.setItem(key, value);
  }
};

uBlock:

µBlock.saveLocalSettings = function() {
  var µb = this;
  return µb.saveLocalStorageItem('immediateHiddenSettings', µb.hiddenSettings);
};

Both projects use JavaScript for their core functionality, but uBlock's codebase is more complex and extensive, reflecting its broader feature set and customization options. Privacy Badger focuses on a simpler, more automated approach to tracking protection, while uBlock provides granular control over content blocking and filtering.

Ghostery Browser Extension for Firefox, Chrome, Opera, Edge and Safari

Pros of Ghostery

  • More comprehensive tracking protection, including social media trackers
  • User-friendly interface with detailed analytics and performance metrics
  • Customizable blocking options and whitelist functionality

Cons of Ghostery

  • Closed-source, which may raise privacy concerns for some users
  • Has been criticized for its business model of selling anonymized user data
  • May cause more website breakage due to aggressive blocking

Code Comparison

Privacy Badger (JavaScript):

badger.storage.getBadgerStorageObject("action_map").setItem(
  tracker_fqdn,
  {
    heuristicAction: "block",
    dnt: false,
    userAction: "",
    nextUpdateTime: nextUpdateTime
  }
);

Ghostery (JavaScript):

ghostery.trackerdb.add({
  name: 'Example Tracker',
  category: 'Advertising',
  pattern: /example\.com/,
  domains: ['example.com'],
});

Both extensions use JavaScript for their core functionality. Privacy Badger focuses on learning and blocking trackers dynamically, while Ghostery relies on a predefined database of trackers. Privacy Badger's approach is more privacy-focused and adaptable, while Ghostery offers more immediate and comprehensive blocking based on its extensive tracker database.

DuckDuckGo Privacy Essentials browser extension for Firefox, Chrome.

Pros of DuckDuckGo Privacy Extension

  • Integrates seamlessly with DuckDuckGo search engine for enhanced privacy
  • Offers a more comprehensive privacy solution, including tracker blocking and HTTPS upgrading
  • Actively maintained with frequent updates and improvements

Cons of DuckDuckGo Privacy Extension

  • Less transparent development process compared to Privacy Badger
  • May have a slightly higher performance impact due to additional features
  • Not as focused on learning and adapting to new trackers over time

Code Comparison

Privacy Badger (JavaScript):

badger.storage.getBadgerStorageObject("action_map").setItem(domain, {
    heuristicAction: "block",
    userAction: "",
    dnt: false,
    nextUpdateTime: 0
});

DuckDuckGo Privacy Extension (JavaScript):

const trackerBlockingWhitelist = settings.getSetting('trackerBlockingWhitelist') || {}
trackerBlockingWhitelist[domain] = true
settings.updateSetting('trackerBlockingWhitelist', trackerBlockingWhitelist)

Both extensions use JavaScript for their core functionality. Privacy Badger focuses on a heuristic approach to blocking trackers, while DuckDuckGo Privacy Extension relies more on predefined lists and user settings. The code snippets show how each extension handles domain-specific actions, with Privacy Badger using a more detailed storage object and DuckDuckGo using a simpler whitelist approach.

Brave browser for Android, iOS, Linux, macOS, Windows.

Pros of Brave Browser

  • Full-featured web browser with built-in privacy and security features
  • Includes ad-blocking, fingerprint protection, and HTTPS upgrades
  • Offers a cryptocurrency-based rewards system for users

Cons of Brave Browser

  • Larger codebase and more complex than a simple browser extension
  • Requires users to switch their primary browser for full benefits
  • Some controversy around its cryptocurrency and ad replacement features

Code Comparison

Privacy Badger (JavaScript):

badger.storage.getBadgerStorageObject("snitch_map")
  .getItemClones().forEach(function(domain, tracker) {
    // Handle tracking domains
});

Brave Browser (C++):

void BraveShieldsHandler::BlockTracker(
    const std::string& tracker_url,
    const std::string& first_party_url) {
  // Implement tracker blocking
}

Summary

Privacy Badger is a focused browser extension for privacy protection, while Brave Browser is a complete web browser with integrated privacy features. Privacy Badger offers a simpler, more targeted approach to tracking prevention, whereas Brave provides a comprehensive browsing experience with additional features like ad replacement and cryptocurrency rewards. The choice between them depends on whether users prefer a standalone extension or are willing to adopt a new browser for enhanced privacy.

Firefox Multi-Account Containers lets you keep parts of your online life separated into color-coded tabs that preserve your privacy. Cookies are separated by container, allowing you to use the web with multiple identities or accounts simultaneously.

Pros of Multi-Account Containers

  • Allows users to separate browsing contexts within the same browser window
  • Provides more granular control over cookie isolation and site-specific settings
  • Integrates seamlessly with Firefox's built-in features

Cons of Multi-Account Containers

  • Limited to Firefox browser only
  • Requires manual setup and management of containers
  • May not block trackers as effectively as dedicated privacy extensions

Code Comparison

Multi-Account Containers:

async function createContainer(name, color, icon) {
  return browser.contextualIdentities.create({
    name: name,
    color: color,
    icon: icon
  });
}

Privacy Badger:

function updateTrackerPrevalence() {
  var trackerDomains = getTrackerDomains();
  for (var domain in trackerDomains) {
    badger.updateTrackerPrevalence(domain, trackerDomains[domain]);
  }
}

The code snippets highlight the different focus areas of each project. Multi-Account Containers deals with creating and managing container contexts, while Privacy Badger focuses on tracking and managing tracker domains for enhanced privacy protection.

AdGuard browser extension

Pros of AdguardBrowserExtension

  • More comprehensive ad-blocking and content filtering capabilities
  • Customizable filtering rules and whitelisting options
  • Regular updates and active development

Cons of AdguardBrowserExtension

  • Closed-source components may raise privacy concerns
  • More complex user interface, potentially overwhelming for some users
  • Resource-intensive due to extensive features

Code Comparison

PrivacyBadger (JavaScript):

badger.storage.getBadgerStorageObject("action_map").setItem(domain, {
  heuristicAction: "allow",
  userAction: "",
  dnt: false,
  nextUpdateTime: 0
});

AdguardBrowserExtension (TypeScript):

export function isHttpRequest(url: string): boolean {
    return url && (url.indexOf('http://') === 0 || url.indexOf('https://') === 0);
}

PrivacyBadger focuses on tracking protection using a learning algorithm, while AdguardBrowserExtension offers broader content filtering capabilities. PrivacyBadger's code snippet demonstrates its domain-based action mapping, while AdguardBrowserExtension's code shows a utility function for URL validation. Both projects aim to enhance user privacy and browsing experience, but AdguardBrowserExtension provides more extensive features at the cost of increased complexity and potential privacy trade-offs due to closed-source components.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Privacy Badger

Privacy Badger is a browser extension that automatically learns to block invisible trackers. Instead of keeping lists of what to block, Privacy Badger automatically discovers trackers based on their behavior.

Privacy Badger sends the Global Privacy Control signal to opt you out of data sharing and selling, and the Do Not Track signal to tell companies not to track you. If trackers ignore your wishes, Privacy Badger will learn to block them.

Besides automatic tracker blocking, Privacy Badger comes with privacy features like click-to-activate replacements for potentially useful trackers (video players, comments widgets, etc.), and link cleaning on Facebook and Google.

To learn more, see the FAQ on Privacy Badger's homepage.

Privacy Badger is a project of the Electronic Frontier Foundation, and is governed by EFF's Public Projects Code of Conduct.

Installing

To install Privacy Badger, visit the Privacy Badger homepage.

Contributing

We're glad you want to help! Please see our contributor guide.

Getting in touch

Besides using the issue tracker or the discussions forum right here on GitHub, you could send us an email or follow @privacybadger on Mastodon.

We also hold public meetings using Jitsi audio conferencing:

  • Mondays at 10:30 AM Pacific Time
  • Thursdays at 01:00 PM Pacific Time

License

Privacy Badger is licensed under the GPLv3+. See LICENSE for more details.