Using the custom filter as a whitelist, and issues

Everything about using Adblock Plus on Mozilla Firefox, Thunderbird and SeaMonkey
Post Reply
Max S.
Posts: 1
Joined: Tue Oct 08, 2019 11:10 pm

Using the custom filter as a whitelist, and issues

Post by Max S. »

Good evening,

I was wondering if anybody else uses Adblock Plus the way I have been for a few years now. I also had a couple questions specific to my setup, if anybody is willing to examine some of the problems I have come across.

The Base
I'm running Firefox (currently 79), Adblock Plus, and Noscript. My philosophy is to keep the browser in full lockdown mode, and to open it up only for sites I trust. Firefox's native enhanced tracking protection is set to custom, with all cookies disabled by default, all tracking content disabled in all windows, cryptominers and fingerprinters blocked, do-not-track signal, etc. With Noscript, I set the "default" preset to allow nothing, and the "trusted" preset allows everything.

With Adblock Plus, I disabled additional tracking, social media icons tracking, and I unchecked "Allow Acceptable Ads". I removed all of the filter lists that come with ABP out of the box. I added the following as my custom filter:

Code: Select all

*$image,third-party
*$script,object,xmlhttprequest,subdocument
This is my base state, so to speak. By default, the only thing that should render is plain text, styling, and first-party images. There are only so many websites I visit for more than plain text content, and for those I can and do make the necessary exemptions.

The reason I use Noscript is because Adblock Plus cannot handle inline javascript. The reason I use Adblock Plus is for its flexible and powerful filter rules.

Trusted Sites
Next I will describe how I handle trusted websites which do not properly function under my basic setup. First I use Noscript to trust the website and any necessary CDNs. For this website, that means "...adblockplus.org" is assigned the "TRUSTED" preset permissions. Second, I open up the developer tools. I will want to look at both the console and the Adblock Plus tab. I will open up a new tab to edit my custom filter list and add exception rules as I see fit. For this website, that rule is:

Code: Select all

@@||adblockplus.org^$script,~third-party
If there are items that I don't feel like allowing, I write my rules around them. Very rarely, I am forced to make exception for individual script or image names. For CDNs, I write the rule with third-party and domain specified. I will reload the page and repeat until there are no more blocked elements that I wish to unblock.

The next step is to make any necessary exceptions in Firefox's native protective layer. This consists primarily of managing exceptions in the browser options, under Privacy & Security->Cookies and Site Data. With this website, I added an exception for https://adblockplus.org.

Questions and Issues
Most of the time, the above setup works very well. I am quite satisfied with it. I suppose my first question would be, am I crazy for browsing like this? Does anybody else do something similar?

On to the issues. I haven't been able to figure out what is the deal with first party "blob" data. If you follow my setup for this very website, the Firefox developer console will tell you upon page load that "Loading failed for the <script> with source 'blob:https://adblockplus.org/[some-kind-of-hash-code]'." and to the right, "viewforum.php:1:1". Indeed, if I go and look at the Debugger tab, I can see that the blob data is some sort of injected function from Adblock Plus ("function injected(eventName, injectedIntoContentWindow)"). I haven't been able to figure out what exactly is blocking that script - it doesn't show up in the Adblock Plus tab, and it doesn't show up in the Noscript drop-down. I've tried exempting blob:* in ABP and Noscript doesn't seem to accept blob URLs.

Sometimes I will be unable to view javascript sources in the Firefox web developer's Debugger tool. I suspect this is related to the above issue.

Very very rarely, a web page will not load properly and get stuck in an infinite loop of reloading the page. This only happens when I try and view the page with the Adblock Plus tab activated in the web developer toolset. It happens so infrequently that I cannot reliably reproduce the issue. It has happened on all sorts of webpages, even ones that I know to work properly. When it does happen, the only way out is to close that tab. Stopping the page and manually reloading, navigating to a different URL, even using the browser back function won't help. Even navigating to a protected page like about:config doesn't help when this issue happens; I have to close the tab out.

Finally, I've had trouble with websites that run on Discourse forum software. Take meta.discourse.org for example. I might turn Noscript off for the tab and disable Firefox's enhanced protections for that site. Then I'll use the following custom filter list:

Code: Select all

*$image,third-party
*$script,object,xmlhttprequest,subdocument
@@||meta.discourse.org^$script,xmlhttprequest,~third-party
@@||cloudfront.net^$image,third-party,domain=meta.discourse.org
@@||cloudfront.net^$script,third-party,domain=meta.discourse.org
Every couple pages, especially after logging in to that forum, I'll get a white screen and a bunch of errors in the console. I am told that just about every script failed to load, and that "A ServiceWorker passed a promises to FetchEvent.respondWith() that rejected with 'Error: no-response :: [{"url":"url-of-script"}]'." The thing is, nothing shows up as blocked by ABP, and I've disabled the other blocking plugin. So I am at a loss.

The whole ServiceWorker concept is a bit confusing to me. It looks like it is hijacking the normal fetch process and I'm not sure if that is triggering ABP or my native Firefox protections or what. If I look into the Network tool I can see that all of the requests actually say "Blocked" in red font, under the "Transferred" column where it normally has the number of bytes transferred. According to Mozilla, it is supposed to say "Blocked by [extension]", and I know it normally says "Blocked by Adblock Plus" if it's ABP.

~Max
Post Reply