You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The $document rule for K-Meleon's adblock.dll doesn't work. If an adblock exception ends in "$document" then the adblocker should ignore all rules on the page. For example on this page:
Expected result: block Amazon ads
Actual result: block Amazon ads
Then I put an exception for that same rule in adblock.txt:
amazon
@@amazon
Expected result: allow Amazon ads
Actual result: allow Amazon ads
And then I tried to use an exception to allow all everything from that site via adblock.txt
amazon
@@||canyoublockit.com^$document
Expected result: allow Amazon ads
Actual result: block Amazon ads
I can see the code in adblock.dll in adblock.cpp that handles exceptions. It has 2 sections that work to disable it for internal "chrome" pages and to disable it when its pref is set to disabled. There's a third section for the $document rule, the one with TYPE_DOCUMENT. I don't understand the language or the engine enough to trouble shoot the issue further:
*_retval = nsIContentPolicy::ACCEPT;
if (!aContext || aContentType == Policy::TYPE_DOCUMENT)
return NS_OK;
if (IsInWhiteList(aContentLocation))
return NS_OK;
if (rules.disabled())
return NS_OK;
The text was updated successfully, but these errors were encountered:
The $document rule for K-Meleon's adblock.dll doesn't work. If an adblock exception ends in "$document" then the adblocker should ignore all rules on the page. For example on this page:
https://canyoublockit.com/advanced-adblocker-test/web-banners/
I set a single rule in my adblockt.txt:
amazon
Expected result: block Amazon ads
Actual result: block Amazon ads
Then I put an exception for that same rule in adblock.txt:
Expected result: allow Amazon ads
Actual result: allow Amazon ads
And then I tried to use an exception to allow all everything from that site via adblock.txt
Expected result: allow Amazon ads
Actual result: block Amazon ads
I can see the code in adblock.dll in adblock.cpp that handles exceptions. It has 2 sections that work to disable it for internal "chrome" pages and to disable it when its pref is set to disabled. There's a third section for the $document rule, the one with TYPE_DOCUMENT. I don't understand the language or the engine enough to trouble shoot the issue further:
The text was updated successfully, but these errors were encountered: