Skip to content

Don't interfer with other filters when unwhitelisting a page

Background

Whitelisting a page is as simple as adding a new custom whitelisting filter. However, for some reason, undoing that not only removes the filter we previously created but also removes any other custom filters and disables any other filters that whitelist the page in question. That leads to non-obvious issues such as ui#210 and trac#7246.

Interestingly, this logic never existed in the legacy Firefox extension and was introduced in the Chrome extension when Wladimir rewrote AdThwart and turned it into Adblock Plus for Chrome (see commit). Therefore we could simplify the code as there is no clear reason why we should keep this approach.

What to change

Unwhitelisting a page should not lead to any modifications to any filters other than the whitelisting filter that was added when the page got whitelisted.