Jump to content
nsane.forums
Sign in to follow this  
snf

uBlock Origin 1.14.25rc0

Recommended Posts

snf

 gorhill released this an hour ago

New

HTML filtering

Ability to remove DOM elements from a source document before it is parsed by the browser. The platform must support an extension API to modify the response body on the fly. Currently only Firefox 57+ allows this.

The filter syntax is similar to cosmetic filtering, except that the character ^ is used before a valid selector to denote that the filter is to be applied to the source data. Contrary to cosmetic filtering, with HTML filtering the elements matching a selector are removed from the source. Example:

twitter.com##^meta[http-equiv="refresh"]
www.google.ca##^#hplogo
boards.4chan.org##^script:has-text(7c9e3a5d51cdacfc)

Note that procedural operators are supported. Procedural operators which are senseless to use on source data will be ignored. For example, it makes no sense to use procedural operator such :matches-css(...) for HTML filtering.

Note that HTML filtering essentially brings back support for inline script tag filtering. I plan on deprecating the syntax ##script:contains(...) in favor of ##^script:has-text(...). For the time being, uBO will conveniently convert the old syntax to the new HTML filtering syntax.

Given that HTML filters are to be applied to the source data of a document, the best way to create such filters is to view-source: the document and from there analyze what should be removed. Thus the element picker won't be extended as a tool to create HTML filters.

This is a first release of the feature, and I do know there is code review needed and TODOs to work on before this makes uBO ready for a release (for example, exceptions are not supported yet).

In case it's still not clear at point: this is a big deal feature.

Sub-filter lists

Ability for filter list maintainers to force uBO to load extra filter lists from within a filter list, using an !#include directive. Example:

!#include adblock_ublock.txt

When uBO encounters the above directive inside a filter list, it tells uBO to load the extra filter list and append it to the current one. The main purpose of such directive is to allow filter list maintainers to be able to make use of uBO's extended filter syntax, without forfeiting the ABP-compatibility of their main filter list: ABP will ignore such directive since it will be seen as a mere comment.

All the details of the new directives syntax is being fleshed out at AdguardTeam/AdguardBrowserExtension#917. At this point only !#include is implemented by uBO, because it solves immediately a current issue by simplifying the work of filter list maintainers who want to make use of uBO's extended filter syntax.

Important: uBO forbids sublists which are outside the directory of the main list. Typically, filter list maintainers will just use a single file name, as seen in the example above, in which case same-origin and same directory is implicit.

Changes

Logger

The logger can now be opened in a sidebar on Firefox. Just open the side bar and "uBlock₀ -- Logger" will be available as a choice.

Given this new ability, I added the following enhancements:

  • A new entry in the tab selector: "Current tab":
    • This will cause the logger to automatically filter out rows which do not belong to the currently active tab.
  • The rows related to behind-the-scene scope are now always shown.
  • If you close a tab while "Current tab" is selected, the resulting void rows will be automatically deleted.
  • You can expand/collapse a single row by clicking on the time stamp cell.

Given that uBO's logger is unified, being able to open the logger in a sidebar means you could end up having multiple views opened for the logger: only one view will work at any given time.

Mind that there are minor visual issues which I have no control over:

  • The maximum horizontal space is limited by the browser.
  • The font size is smaller than dictated in the DOM inspector view: I have no clue why, uBO's chosen font size is overridden by Firefox for some reasons.
  • If you have the logger already opened in a tab or separate window, you will have to close these for the logger-in-a-sidebar to start working. However some internal message events are lost in Firefox and as a result the logger-in-a-sidebar may take over 30 seconds to start working after you close the logger-in-a-tab or window.

Closed as fixed:

Firefox

Core

 

 

Chromium

You can install the latest version manually, from the Chrome Store, or from the Opera store.

There is also a development version in the Chrome store if you want to test uBlock Origin with the latest changes: see uBlock Origin dev build.

It is expected that uBlock Origin is compatible with any Chromium-based browsers.

Firefox / Firefox for Android

Firefox Add-ons web site.

There is also a development version if you want to test uBlock Origin with the latest changes: see beta channel for uBlock Origin

uBlock Origin is compatible with SeaMonkey, Pale Moon, and possibly other browsers based on Firefox.

Thanks to Debian contributor Sean Whitton, users of Debian 9 or later or Ubuntu 16.04 or later may simply apt-get install xul-ext-ublock-origin.

Microsoft Edge

Developer: @nikrolls.

Stable version available in Microsoft Store.

Development version available at https://github.com/nikrolls/uBlock-Edge#edge.

Note that issues specific to the Edge fork are the responsibility of the current maintainer, I have no control over the code base of the fork.

Safari (macOS)

Developer: @el1t.

Development version available at https://github.com/el1t/uBlock-Safari#ublock-originfor-safari.

Note that issues specific to the Safari fork are the responsibility of the current maintainer, I have no control over the code base of the fork.

Note for all browsers

To benefit from uBlock Origin's higher efficiency, it's advised that you don't use other inefficient blockers at the same time (such as AdBlock or Adblock Plus). uBlock₀ will do as well or better than most popular ad blockers. Other blockers can also prevent uBlock₀'s privacy or anti-blocker features from working properly.

Deploying

Below is documentation to assist administrators in deploying uBlock Origin:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×