explaingit

gorhill/ublock

64,442JavaScriptAudience · generalComplexity · 1/5LicenseSetup · easy

TLDR

A browser extension that blocks ads, trackers, and malware by intercepting network requests before they load, making web pages faster and protecting your privacy.

Mindmap

mindmap
  root((ublock origin))
    What it does
      Blocks ads and trackers
      Intercepts requests
      Faster page loads
    How it works
      Community filter lists
      Network request rules
      Cosmetic filters
    Features
      Default install-and-forget
      Advanced firewall mode
      Per-site rules
    Tech Stack
      JavaScript
      Browser extension API
    Browsers
      Firefox best support
      Chrome Edge Opera
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Install as a browser extension to automatically block ads and trackers on every website you visit.

USE CASE 2

Enable advanced firewall mode to set per-site rules controlling exactly which third-party requests a page can make.

USE CASE 3

Use custom filter lists to block specific categories of content beyond the built-in defaults.

Tech stack

JavaScript

Getting it running

Difficulty · easy Time to first run · 5min

Chrome support ends at version 139 due to Google's extension API changes, best experience is on Firefox.

GPLv3, free to use, modify, and distribute, but any changes you distribute must also be released under GPLv3.

In plain English

uBlock Origin is a browser extension that blocks ads, trackers, malware sites, pop-ups, and other unwanted content when you browse the web. The problem it solves is that modern websites often load dozens of hidden third-party scripts that track your behavior, slow down page loading, and expose you to potential security risks. uBlock Origin intercepts these requests before they reach your browser, making pages load faster and protecting your privacy. It works by consulting filter lists, large community-maintained text files containing rules that describe which web requests to block. By default it uses well-known lists like EasyList for ads and EasyPrivacy for trackers. It extends this standard filter syntax with its own additional capabilities for more precise blocking. The extension is available for Firefox, Chrome, Edge, and Opera, and the README notes that it performs best on Firefox where the browser grants it full access to the network filtering APIs. For most users it is install-and-forget, but an advanced mode exposes a point-and-click per-site firewall for fine-grained control. The README emphasizes that blocking ads is not theft, uBlock Origin's primary aim is protecting user privacy from the broader ecosystem of tracking that ads represent. It is free, open-source under the GPLv3 license, and accepts no donations. The README also notes that Chrome support is ending at version 139 due to Google's changes to the browser extension API. The tech stack is plain JavaScript, packaged as a browser extension.

Copy-paste prompts

Prompt 1
Write a uBlock Origin custom filter rule that blocks all network requests to a specific analytics domain on every site I visit.
Prompt 2
How do I use uBlock Origin advanced mode to block all third-party scripts on a site while whitelisting the ones I need?
Prompt 3
Write uBlock Origin cosmetic filter rules to hide cookie consent banners on major news websites.
Open on GitHub → Explain another repo

← gorhill on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.