uBlock Origin (or uBlock0) is not an ad blocker; it's a general-purpose blocker. uBlock0 blocks ads through its support of the Adblock Plus filter syntax. uBlock0 extends the syntax and is designed to work with custom rules and filters.
That said, it's important to note that using a blocker is NOT theft. Don't fall for this creepy idea. The ultimate logical consequence of blocking = theft is the criminalisation of the inalienable right to privacy.
Ads, "unintrusive" or not, are just the visible portions of privacy-invading apparatus entering your browser when you visit most sites nowadays. uBlock0's main goal is to help users neutralize such privacy-invading apparatus — in a way that welcomes those users who don't wish to use more technical, involved means (such as µMatrix).
EasyList, Peter Lowe's Adservers, EasyPrivacy and Malware domains are enabled by default when you install uBlock0. Many more lists are readily available to block trackers, analytics, and more. Hosts files are also supported.
Once you install uBlock0, you may easily un-select any of the pre-selected filter lists if you think uBlock0 blocks too much. For reference, Adblock Plus installs with only EasyList enabled by default.
Changes
New:
New cosmetic filtering operators:
:has
This is a planned CSS4 operator, but no browser supports it yet. I decided to go ahead and implement it so that it can already be used. See The Relational Pseudo-class: :has()
in the Selector Level 4/Editor's Draft.
uBO's implementation is simplified so as to ensure performance. The :has
operator must be used with at least one hostname (it must be specific), and must be of the form (example):
yandex.ru##.serp-item:has(.label_color_yellow)
In this example, yandex.ru
is the hostname. The part preceding :has(...)
-- .serp-item
above -- is the DOM node which will be targeted (i.e. hidden by uBO), and must be a valid CSS expression. The part inside the :has
parentheses -- .label_color_yellow
above -- must be a valid CSS expression, and is the condition that must be fulfilled -- i.e. in the above example, nodes which have a class serp-item
will be hidden if and only if they have a descendant with class label_color_yellow
.
:xpath
This new cosmetic filter operator is to support and leverage the power of XPaths. The :xpath()
operator must always be used in a specific cosmetic filter, i.e. they must apply to at least one hostname or entity. An example of how to use it:
go.mail.ru##:xpath(/html/body//div[@id="layout"]//div[@class="responses__wrapper"]/div/div[.//text()="Реклама"])
These new operators are to be used only for cosmetic filtering cases which are hard to crack -- more and more of these are surfacing (for example DOM elements with random class or id values).
When it comes to cosmetic filtering, preferably, always favor a plain old CSS3-based cosmetic filter, since they can be used in a declarative way, inside a style
tag. But there are cases where no CSS3-based expression will work, and in such case consider these new :has
and :xpath
operators.
Note that unlike :has
, :xpath
is not a valid CSS4 expression, so they will always be enforced in a non-declarative way (in other word, javascript is doing the filtering, through document.evaluate
).
These new cosmetic filtering operators can be "excepted" like any other standard CSS3-based cosmetic filter using the usual #@#
prompt. Such exception cosmetic filters do not have to be specific however, i.e. you do not have to associate them to a specific hostname/entity.
:style
Related issue: Support cosmetic filters with explicit style properties.
By default, the implicit purpose of cosmetic filters is to hide unwanted DOM elements. However sometimes it may be useful to re-style a specific DOM element on a page rather than hide it. Here is an recent example of such cases. This is the purpose of the new :style
-based selector. The syntax is as follow:
example.com##h1:style(background-color: blue !important)
So mainly it's exactly the same syntax of plain cosmetic filters, except that the :style(...)
suffix is appended at the end. The content in the parentheses must be one or more CSS property declarations (separated by the standard ;
).
As with the other new cosmetic filtering selectors, the :style
can be used only for specific cosmetic filters, i.e. there must be a hostname of entity specified for the filter.
Adguard already support such feature, although using a different syntax. However uBO is able to transparently convert and make use of the Adguard's "CSS injection rules" if ever you use an Adguard filter list in uBO (well, this essentially means you can use Adguard's syntax in uBO if you prefer).
Closed as fixed:
Firefox
- uMatrix's fix to issue #540 has been imported into uBO.
Core
- Fixed a static filtering issue reported in EasyList forum.
-
Separator
^
is being stripped off filters
Download Links