Web Extensions builds are now the official Adblock Plus for Firefox development builds · 60 days ago by Wladimir Palant

A while ago we announced our plan to migrate to the Web Extensions platform. With the current Firefox nightly builds being incompatible to classic add-ons already, we need to move a bit prematurely. So starting with Adblock Plus 2.99.0.1814 development build, our development builds will be using the Web Extensions platform. If you are on Firefox 57, make sure to install the latest Adblock Plus development build and it will be working again.

There are some drawbacks here. Most notably, the user interface will be more limited than what you are used to. The work improving the options page is almost done and should land soon, other parts of the user interface will follow. Still, disabling individual filters won’t be back for a while, which is why we are re-enabling any filters you might have disabled in subscriptions. Disabled custom filters will be automatically replaced by comments. We also remove any automatic backups (not the manual backups) you might have, these degrade Firefox performance and currently cannot be recovered anyway.

The other important drawback is very limited Android support. There is ongoing work both on our and Mozilla’s side here, so things should improve very soon.

To the install page

Read more Comment [2]

Tags:

New #?# syntax for advanced element hiding rules · 125 days ago by Hubert Figuière

Starting with Adblock Plus 1.13.3 for Chrome and Opera (and development builds as of 1.13.2.1782) there is a new and improved syntax which can be used for advanced element hiding filters. It allows for elements to be hidden based upon their contents using :-abp-has. CSS property filters have also being adjusted to be consistent with the new syntax, so both those and :-abp-has filters now use the #?# option separator.

So for example here’s a standard element hiding filter:

domain.com##selector

Which with the new advanced syntax could be written as:

domain.com#?#selector

The overall syntax is the same, but #?# filters have access to a few extensions implemented as CSS pseudo classes. This extra power comes with a cost however, the new #?# filters are much slower and should only be used where necessary. The above example is bad therefore, since none of those extensions are being used. Filters using the new syntax must also be restricted to as few domains as possible, without any domain restrictions they are rejected outright.

So which CSS pseudo classes are supported?

:-abp-properties() (CSS property filters)

The pseudo-class :-abp-properties() is a reworked syntax for the CSS property filter. The value of the -abp-properties attribute becomes the argument passed to the pseudo-class selector. Your old filters will be converted automatically when loading the filter lists, and will work the same way. For example:

domain.com##[-abp-properties='background-color: rgb(0, 0, 0)']

becomes:

domain.com#?#:-abp-properties(background-color: rgb(0, 0, 0))

Note the lack of quotes. As before, you can combine this into a more complex CSS selector.

:-abp-has()

With this change we introduced a new pseudo-class: :-abp-has(selector). Inspired by the CSS Level 4 draft :has(), this pseudo-class selects an element if it contains something that matches the selector passed an argument.

Example 1:

domain.com#?#div.sidebar > div:-abp-has(> video.ad)

On the site “domain.com”, hide the element that has as direct descendant a <video> element with the class “ad” and is a direct descendent of a <div> that has the class “sidebar”. We want the enclosing element because it contain other things with want to hide.

Example 2:

domain.com#?#div.sidebar > div:-abp-has(> div.sidebartitle) > .adtext

On the site domain.com, hide the elements with the class “adtext”, that are direct descendent of a <div> element that also has a direct descendent a <div> with the class “sidebartitle”, and that is a direct descendent of a <div> that has the class “sidebar”.

Note: It is recommended to not nest :-abp-has() where possible, as that will further slow down element hiding. Also it is recommended that the selector inside a :-abp-has() starts with a combinator like >, + or ~. Otherwise a lot of elements will be needlessly selected as more that one ancestor will match.

To the install page

Read more Comment

Tags:

Fixing Adblock Plus 2.9 for Thunderbird and SeaMonkey users · 144 days ago by Wladimir Palant

Adblock Plus 2.9 introduced very significant changes to the data storage. The unfortunate side-effect was that Adblock Plus was broken for Thunderbird users as well as users on pre-release SeaMonkey versions, and nobody noticed before the release. After we discovered a problem with our original fix, as of Adblock Plus 2.9.0.4251-beta development build things should work correctly on all platforms. This being a rather non-trivial change, your feedback is appreciated. If no other issues pop up we plan to release Adblock Plus 2.9.1 next Tuesday, June 6.

To the install page

Read more Comment

Tags:

New filter type option for WebRTC connections · 194 days ago by Dave Barker

Starting with Adblock Plus 1.13.3 for Chrome and Opera (and development builds as of 1.13.2.1761) the blocking of WebRTC connections is supported. Those connections will have the new request type of “webrtc” and so filters can be made to target them by adding the $webrtc type option.

WebRTC is an experimental browser technology which is supposed to be used for things like video conferencing. Unfortunately despite still being in active development it’s already being misused to serve adverts! Since Chrome does not yet allow WebRTC connections to be blocked by extensions directly (Chromium issue 707683), we’ve had to implement a workaround to achieve this.

Support for other platforms such as Firefox should follow soon, we’ll keep you posted.

To the install page

Read more Comment

Tags:

New data storage in Adblock Plus for Firefox · 195 days ago by Wladimir Palant

As of Firefox 57, classic extensions such as the current Adblock Plus for Firefox will no longer load and only Web Extensions will be allowed to continue working. In order to prepare for the transition, starting with Adblock Plus 2.8.2.4244 development build we will use Web Extensions for data storage. Any existing data (this includes both current filters/subscriptions and automatic backups) will be taken over automatically and ideally there should be no visible changes at this point. However, the data will no longer be stored in the adblockplus/patterns.ini file of your Firefox profile but rather in the browser-extension-data/{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}/storage.json file.

Please tell us about any data loss issues you encounter after this change. We are moving towards releasing Adblock Plus 2.9 which will start data migration for our entire user base. Note that the format of the Web Extensions storage is still supposed to change which will hopefully make it more robust and performant.

To the install page

Read more Comment

Tags:

CSS property matching improvements · 343 days ago by Felix Dahlke

About a year ago, we introduced CSS property filters as a means of hiding elements based on their styles. Today, we have landed two improvements to this:

Case insensitive matching

This is a change in semantics; CSS properties will now always be matched in a case insensitive manner, to make it consistent with the way Adblock Plus matches URLs. This is unlikely to result in undesired behaviour as there shouldn’t be many use cases for case sensitive property matching.

Regular expression matching

Until now, CSS properties could only be matched using the simple URL matching syntax, which made it difficult to match property values in a fine-grained manner. To address this, properties can now optionally be matched using regular expressions. The default matching behaviour is still the same, to use regular expressions, a matching expression needs to start and end with /, for example:

example.com##[-abp-properties='/width: 3[2-8]px;/']

These improvements are available in Adblock Plus for Firefox as of 2.8.1.4229 and Adblock Plus for Chrome and Opera as of 1.12.4.1682, and will presumably be released with the next stable version on each platform respectively.

Please note that we still consider CSS property filters an experimental feature, and therefore subject to change. Considering this, and the fact that CSS property filters are slower than regular element hiding rules, they should only be used as a last resort.

To the install page

Read more Comment

Tags:

New development build of Adblock Plus for Internet Explorer is available · 369 days ago by Oleksandr Paraska

A new development build of Adblock Plus for Internet Explorer is finally available. The most important change in this version is the change to the element hiding functionality. As of this version on IE10+ the element hiding will be done in a similar way as in our other extensions.

Read more

New element hiding approach in Firefox · 378 days ago by Wladimir Palant

Traditionally, element hiding on Firefox worked quite differently from all other platforms supported by Adblock Plus. Rather than decide on the filters for each website individually, all element hiding rules would be written into a single elemhide.css stylesheet file that would apply to all websites unconditionally. This approach had a few disadvantages:

Luckily, Firefox implemented better mechanisms to apply stylesheets to documents a while ago and as of Adblock Plus 2.7.3.4206-beta development build we are now taking full advantage of these. We will now make a separate decision for each website, which (if any) element hiding rules should apply. And we don’t sacrifice performance for that because the majority of element hiding rules will go into a preloaded stylesheet with all the rules which apply unconditionally.

There are a few drawbacks here:

This is a huge change to the inner workings of Adblock Plus and while we tested it quite thoroughly some issues are expected — let us know if you notice any.

To the install page

Read more Comment [2]

Tags:

New filter type option for WebSockets · 397 days ago by Wladimir Palant

Starting with Adblock Plus 1.12.2 for Chrome, Opera and Safari we can block connections initiated via WebSockets on all major platforms (this functionality was available on Firefox since the very start). However, we didn’t have a special type for these requests as these were listed with type “other” instead. The assumption was that the protocol ws:// or wss:// would be sufficient for filter list authors in order to target WebSocket connections specifically. However, we received feedback that this wasn’t the case.

So with the current development builds (Adblock Plus 2.7.3.4202 for Firefox and Adblock Plus 1.12.2.1655 for Google Chrome, Opera and Safari) WebSocket connections are listed with the new type “websocket.” Consequently, filters can be made to target such connections specifically by adding $websocket type option. Existing filters will have to be duplicated for now:

something$websocket
something$other

This syntax will support both new and old Adblock Plus versions as long as the versions without support for the “websocket” type are still common (these will ignore the first filter).

To the install page

Edit (2016-09-22): This post was originally suggesting specifying both websocket and other options on one filter. This approach will not work in Adblock Plus versions without support for the websocket option because filters with unknown options are ignored.

Read more Comment [2]

Tags:

Experimental Safari Content Blocking support · 523 days ago by Dave Barker

With Safari 9 Apple announced support for Content Blocking Extensions, with the aim of providing a more efficient way for Safari extensions to block adverts. (At the same time they announced the depreciation of the old method Safari extensions use to block adverts, implying it is likely to be removed from future Safari versions.) Since then we have been working on adding experimental Content Blocking support to Adblock Plus (issue 3687). It will be available as of Adblock Plus 1.12 for Safari and is now in the developments builds as of 1.11.0.1602.

Content Blocking can be enabled from the options page for supported versions of Adblock Plus and Safari:

Safari Content Blocking experimental option

But wait! Before you give it a try, here are some things you should know:

To the install page

Read more

Tags:

Previous